constexpr enum_type operator&(enum_type left, enum_type right) noexcept \
{ \
return static_cast<enum_type>(static_cast<std::underlying_type_t<enum_type>>(left) & static_cast<std::underlying_type_t<enum_type>>(right)); \
} \
constexpr enum_type operator|(enum_type left, enum_type right) noexcept \
{ \
return static_cast<enum_type>(static_cast<std::underlying_type_t<enum_type>>(left) | static_cast<std::underlying_type_t<enum_type>>(right)); \
} \
constexpr enum_type operator^(enum_type left, enum_type right) noexcept \
{ \
return static_cast<enum_type>(static_cast<std::underlying_type_t<enum_type>>(left) ^ static_cast<std::underlying_type_t<enum_type>>(right)); \
} \
constexpr enum_type operator~(enum_type left) noexcept \
{ \
return static_cast<enum_type>(~static_cast<std::underlying_type_t<enum_type>>(left)); \
} \
constexpr enum_type& operator&=(enum_type& left, enum_type right) noexcept \
{ \
return left = left & right; \
} \
constexpr enum_type& operator|=(enum_type& left, enum_type right) noexcept \
{ \
return left = left | right; \
} \
constexpr enum_type& operator^=(enum_type& left, enum_type right) noexcept \
{ \
return left = left ^ right; \
}
Defines operators required for an enum to meet BitmaskType requirements.