diff options
Diffstat (limited to 'src/value.h')
-rw-r--r-- | src/value.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/value.h b/src/value.h index 3c6c1d41..1fedbba8 100644 --- a/src/value.h +++ b/src/value.h @@ -361,16 +361,21 @@ public: /** * Comparison operators. Values can be compared to other values */ - bool operator==(const value_t& val) const; - bool operator<(const value_t& val) const; + bool is_equal_to(const value_t& val) const; + bool is_less_than(const value_t& val) const; + bool is_greater_than(const value_t& val) const; template <typename T> bool operator==(const T& amt) const { - return *this == value_t(amt); + return is_equal_to(amt); } template <typename T> bool operator<(const T& amt) const { - return *this < value_t(amt); + return is_less_than(amt); + } + template <typename T> + bool operator>(const T& amt) const { + return is_greater_than(amt); } /** |