Scorum
market_comparison.hpp
Go to the documentation of this file.
1 #include <scorum/utils/static_variant_comparison.hpp>
2 
3 namespace scorum {
4 namespace protocol {
5 
6 template <market_kind kind, typename tag>
8 {
9  return lhs.threshold < rhs.threshold;
10 }
11 
12 template <market_kind kind, typename tag>
14 {
15  return false;
16 }
17 
18 template <market_kind kind, typename tag>
20 {
21  return std::tie(lhs.home, lhs.away) < std::tie(rhs.home, rhs.away);
22 }
23 }
24 }
25 
26 namespace fc {
28 
29 template <> inline bool market_type::less_than(const market_type& that) const
30 {
31  return scorum::utils::variant_less(*this, that);
32 }
33 
34 template <> inline bool market_type::equal_to(const market_type& that) const
35 {
36  return scorum::utils::variant_eq(*this, that);
37 }
38 }
Definition: game.cpp:4
bool operator<(const over_under_market< kind, tag > &lhs, const over_under_market< kind, tag > &rhs)
fc::static_variant< result_home, result_draw, result_away, round_home, handicap, correct_score_home, correct_score_draw, correct_score_away, correct_score, goal_home, goal_both, goal_away, total, total_goals_home, total_goals_away > market_type
Definition: market.hpp:97
Definition: asset.cpp:15