diff --git a/enum.h b/enum.h index c89804b..37ee182 100644 --- a/enum.h +++ b/enum.h @@ -933,26 +933,62 @@ BETTER_ENUMS_IGNORE_ATTRIBUTES_BEGIN \ 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::_enumerated &a, const Enum &b) \ + { return a == 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 &a, const Enum &b) \ { return a._to_integral() != b._to_integral(); } \ +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::_enumerated &b) \ + { return a._to_integral() != b; } \ \ 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::_enumerated &a, const Enum &b) \ + { return a < 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 &a, const Enum &b) \ { return a._to_integral() <= b._to_integral(); } \ +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::_enumerated &b) \ + { return a._to_integral() <= b; } \ \ 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::_enumerated &a, const Enum &b) \ + { return a > 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 &a, const Enum &b) \ { return a._to_integral() >= b._to_integral(); } \ +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::_enumerated &b) \ + { return a._to_integral() >= b; } \ BETTER_ENUMS_IGNORE_ATTRIBUTES_END \ \ \