diff --git a/enum.h b/enum.h index 9232e9d..399f459 100644 --- a/enum.h +++ b/enum.h @@ -942,18 +942,50 @@ inline bool operator <(const Enum &a, const Enum &b) \ { return a._to_integral() < b._to_integral(); } \ \ BETTER_ENUMS_UNUSED BETTER_ENUMS_CONSTEXPR_ \ +inline bool operator <(const Enum &a, const Enum::_enumerated &b) \ + { return a._to_integral() < b; } \ + \ +BETTER_ENUMS_UNUSED BETTER_ENUMS_CONSTEXPR_ \ +inline bool operator <(const Enum::_enumerated &a, const Enum &b) \ + { return a < b._to_integral(); } \ + \ +BETTER_ENUMS_UNUSED BETTER_ENUMS_CONSTEXPR_ \ inline bool operator <=(const Enum &a, const Enum &b) \ { return a._to_integral() <= b._to_integral(); } \ \ BETTER_ENUMS_UNUSED BETTER_ENUMS_CONSTEXPR_ \ +inline bool operator <=(const Enum &a, const Enum::_enumerated &b) \ + { return a._to_integral() <= b; } \ + \ +BETTER_ENUMS_UNUSED BETTER_ENUMS_CONSTEXPR_ \ +inline bool operator <=(const Enum::_enumerated &a, const Enum &b) \ + { return a <= b._to_integral(); } \ + \ +BETTER_ENUMS_UNUSED BETTER_ENUMS_CONSTEXPR_ \ inline bool operator >(const Enum &a, const Enum &b) \ { return a._to_integral() > b._to_integral(); } \ \ BETTER_ENUMS_UNUSED BETTER_ENUMS_CONSTEXPR_ \ +inline bool operator >(const Enum &a, const Enum::_enumerated &b) \ + { return a._to_integral() > b; } \ + \ +BETTER_ENUMS_UNUSED BETTER_ENUMS_CONSTEXPR_ \ +inline bool operator >(const Enum::_enumerated &a, const Enum &b) \ + { return a > b._to_integral(); } \ + \ +BETTER_ENUMS_UNUSED BETTER_ENUMS_CONSTEXPR_ \ inline bool operator >=(const Enum &a, const Enum &b) \ { return a._to_integral() >= b._to_integral(); } \ BETTER_ENUMS_IGNORE_ATTRIBUTES_END \ \ +BETTER_ENUMS_UNUSED BETTER_ENUMS_CONSTEXPR_ \ +inline bool operator >=(const Enum &a, const Enum::_enumerated &b) \ + { return a._to_integral() >= b; } \ + \ +BETTER_ENUMS_UNUSED BETTER_ENUMS_CONSTEXPR_ \ +inline bool operator >=(const Enum::_enumerated &a, const Enum &b) \ + { return a >= b._to_integral(); } \ + \ \ template \ std::basic_ostream& \