diff --git a/src/query/typed_value.hpp b/src/query/typed_value.hpp index db68628cd..5597212fc 100644 --- a/src/query/typed_value.hpp +++ b/src/query/typed_value.hpp @@ -14,7 +14,6 @@ #include "storage/edge_accessor.hpp" #include "storage/vertex_accessor.hpp" #include "utils/exceptions.hpp" -#include "utils/total_ordering.hpp" namespace query { @@ -26,8 +25,7 @@ namespace query { * Values can be of a number of predefined types that are enumerated in * TypedValue::Type. Each such type corresponds to exactly one C++ type. */ -class TypedValue - : public utils::TotalOrdering { +class TypedValue { public: /** Custom TypedValue equality function that returns a bool * (as opposed to returning TypedValue as the default equality does). @@ -274,4 +272,20 @@ TypedValue operator^(const TypedValue &a, const TypedValue &b); // stream output std::ostream &operator<<(std::ostream &os, const TypedValue::Type type); +inline TypedValue operator!=(const TypedValue &a, const TypedValue &b) { + return !(a == b); +} + +inline TypedValue operator<=(const TypedValue &a, const TypedValue &b) { + return a < b || a == b; +} + +inline TypedValue operator>(const TypedValue &a, const TypedValue &b) { + return !(a <= b); +} + +inline TypedValue operator>=(const TypedValue &a, const TypedValue &b) { + return !(a < b); +} + } // namespace query