mirror of
https://github.com/aantron/better-enums.git
synced 2025-12-07 17:26:45 +08:00
Merge ad5ed9ba0b8ee08f23b99438a115ef01e0634779 into 520d8ee39037c9c94aa6e708a4fd6c0fa313ae80
This commit is contained in:
commit
08660806f6
36
enum.h
36
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 \
|
||||
\
|
||||
\
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user