Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
\
\
Expand Down