diff --git a/include/stdex/interval.hpp b/include/stdex/interval.hpp index ddb84b0b2..5e35f5a98 100644 --- a/include/stdex/interval.hpp +++ b/include/stdex/interval.hpp @@ -59,6 +59,24 @@ namespace stdex /// \returns true if interval is valid or false otherwise /// inline operator bool() const { return start <= end; } + + /// + /// Are intervals identical? + /// + /// \param[in] other Other interval to compare against + /// + /// \returns true if intervals are identical or false otherwise + /// + inline bool operator==(const interval& other) const { return start == other.start && end == other.end; } + + /// + /// Are intervals different? + /// + /// \param[in] other Other interval to compare against + /// + /// \returns true if intervals are different or false otherwise + /// + inline bool operator!=(const interval& other) const { return !operator==(other); } }; template >>