diff --git a/include/stdex/interval.hpp b/include/stdex/interval.hpp index aff099d87..c4c7fa84e 100644 --- a/include/stdex/interval.hpp +++ b/include/stdex/interval.hpp @@ -77,6 +77,15 @@ namespace stdex /// \returns true if intervals are different or false otherwise /// inline bool operator!=(const interval& other) const { return !operator==(other); } + + /// + /// Is value in interval? + /// + /// \param[in] x Value to test + /// + /// \returns true if x is in [start, end) or false otherwise + /// + inline bool contains(_In_ T x) const { return start <= x && x < end; } }; template >>