@@ -23,6 +23,48 @@ auto t_not(const T1&) {
2323 throw std::domain_error (ss.str ());
2424 return nullptr ; // Must return something
2525}
26+ template <typename T1, typename T2>
27+ auto t_gt (const T1&, const T2&) {
28+ std::ostringstream ss{};
29+ ss << " Unable to compare (>) types " << typeid (T1).name () << " and " << typeid (T2).name ();
30+ throw std::domain_error (ss.str ());
31+ return nullptr ; // Must return something
32+ }
33+ template <typename T1, typename T2>
34+ auto t_ge (const T1&, const T2&) {
35+ std::ostringstream ss{};
36+ ss << " Unable to compare (>=) types " << typeid (T1).name () << " and " << typeid (T2).name ();
37+ throw std::domain_error (ss.str ());
38+ return nullptr ; // Must return something
39+ }
40+ template <typename T1, typename T2>
41+ auto t_ee (const T1&, const T2&) {
42+ std::ostringstream ss{};
43+ ss << " Unable to compare (==) types " << typeid (T1).name () << " and " << typeid (T2).name ();
44+ throw std::domain_error (ss.str ());
45+ return nullptr ; // Must return something
46+ }
47+ template <typename T1, typename T2>
48+ auto t_ne (const T1&, const T2&) {
49+ std::ostringstream ss{};
50+ ss << " Unable to compare (!=) types " << typeid (T1).name () << " and " << typeid (T2).name ();
51+ throw std::domain_error (ss.str ());
52+ return nullptr ; // Must return something
53+ }
54+ template <typename T1, typename T2>
55+ auto t_le (const T1&, const T2&) {
56+ std::ostringstream ss{};
57+ ss << " Unable to compare (<=) types " << typeid (T1).name () << " and " << typeid (T2).name ();
58+ throw std::domain_error (ss.str ());
59+ return nullptr ; // Must return something
60+ }
61+ template <typename T1, typename T2>
62+ auto t_lt (const T1&, const T2&) {
63+ std::ostringstream ss{};
64+ ss << " Unable to compare (<) types " << typeid (T1).name () << " and " << typeid (T2).name ();
65+ throw std::domain_error (ss.str ());
66+ return nullptr ; // Must return something
67+ }
2668
2769template <>
2870auto t_and (const bool & a, const bool & b) {
@@ -37,6 +79,40 @@ auto t_not(const bool& a) {
3779 return !a;
3880}
3981
82+ auto t_gt (const int & a, const int & b) {return a > b;}
83+ auto t_gt (const int & a, const float & b) {return a > b;}
84+ auto t_gt (const float & a, const int & b) {return a > b;}
85+ auto t_gt (const float & a, const float & b) {return a > b;}
86+
87+ auto t_ge (const int & a, const int & b) {return a >= b;}
88+ auto t_ge (const int & a, const float & b) {return a >= b;}
89+ auto t_ge (const float & a, const int & b) {return a >= b;}
90+ auto t_ge (const float & a, const float & b) {return a >= b;}
91+
92+ auto t_ee (const bool & a, const bool & b) {return a == b;}
93+ auto t_ee (const int & a, const int & b) {return a == b;}
94+ auto t_ee (const int & a, const float & b) {return a == b;}
95+ auto t_ee (const float & a, const int & b) {return a == b;}
96+ auto t_ee (const float & a, const float & b) {return a == b;}
97+ auto t_ee (const std::string& a, const std::string& b) {return a == b;}
98+
99+ auto t_ne (const bool & a, const bool & b) {return a != b;}
100+ auto t_ne (const int & a, const int & b) {return a != b;}
101+ auto t_ne (const int & a, const float & b) {return a != b;}
102+ auto t_ne (const float & a, const int & b) {return a != b;}
103+ auto t_ne (const float & a, const float & b) {return a != b;}
104+ auto t_ne (const std::string& a, const std::string& b) {return a != b;}
105+
106+ auto t_lt (const int & a, const int & b) {return a < b;}
107+ auto t_lt (const int & a, const float & b) {return a < b;}
108+ auto t_lt (const float & a, const int & b) {return a < b;}
109+ auto t_lt (const float & a, const float & b) {return a < b;}
110+
111+ auto t_le (const int & a, const int & b) {return a <= b;}
112+ auto t_le (const int & a, const float & b) {return a <= b;}
113+ auto t_le (const float & a, const int & b) {return a <= b;}
114+ auto t_le (const float & a, const float & b) {return a <= b;}
115+
40116symbol_value_t and_ (const symbol_value_t & a, const symbol_value_t & b) {
41117 symbol_value_t res{};
42118 FUNC_IMPL (a, t_and, b, res);
@@ -61,3 +137,33 @@ symbol_value_t not_(const symbol_value_t& a) {
61137symbol_value_t operator !(const symbol_value_t & a) {
62138 return not_ (a);
63139}
140+ symbol_value_t gt_ (const symbol_value_t & a, const symbol_value_t & b) {
141+ symbol_value_t res{};
142+ FUNC_IMPL (a, t_gt, b, res);
143+ return res;
144+ }
145+ symbol_value_t ge_ (const symbol_value_t & a, const symbol_value_t & b) {
146+ symbol_value_t res{};
147+ FUNC_IMPL (a, t_ge, b, res);
148+ return res;
149+ }
150+ symbol_value_t ee_ (const symbol_value_t & a, const symbol_value_t & b) {
151+ symbol_value_t res{};
152+ FUNC_IMPL (a, t_ee, b, res);
153+ return res;
154+ }
155+ symbol_value_t ne_ (const symbol_value_t & a, const symbol_value_t & b) {
156+ symbol_value_t res{};
157+ FUNC_IMPL (a, t_ne, b, res);
158+ return res;
159+ }
160+ symbol_value_t le_ (const symbol_value_t & a, const symbol_value_t & b) {
161+ symbol_value_t res{};
162+ FUNC_IMPL (a, t_le, b, res);
163+ return res;
164+ }
165+ symbol_value_t lt_ (const symbol_value_t & a, const symbol_value_t & b) {
166+ symbol_value_t res{};
167+ FUNC_IMPL (a, t_lt, b, res);
168+ return res;
169+ }
0 commit comments