1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-10 23:44:29 +00:00

fix bitwise_operators

This commit is contained in:
neargye 2019-08-20 00:01:53 +05:00
parent e15c38ac65
commit 7c7cdc906b

View file

@ -439,7 +439,6 @@ constexpr E operator^(E lhs, E rhs) {
template <typename E, typename D = detail::enable_if_enum_t<E>>
constexpr E& operator|=(E& lhs, E rhs) {
static_assert(detail::check_enum_v<E, D>, "magic_enum::bitwise_operators::operator|= requires enum type.");
using U = std::underlying_type_t<D>;
return lhs = lhs | rhs;
}
@ -447,7 +446,6 @@ constexpr E& operator|=(E& lhs, E rhs) {
template <typename E, typename D = detail::enable_if_enum_t<E>>
constexpr E& operator&=(E& lhs, E rhs) {
static_assert(detail::check_enum_v<E, D>, "magic_enum::bitwise_operators::operator%= requires enum type.");
using U = std::underlying_type_t<D>;
return lhs = lhs & rhs;
}
@ -455,7 +453,6 @@ constexpr E& operator&=(E& lhs, E rhs) {
template <typename E, typename D = detail::enable_if_enum_t<E>>
constexpr E& operator^=(E& lhs, E rhs) {
static_assert(detail::check_enum_v<E, D>, "magic_enum::bitwise_operators::operator^= requires enum type.");
using U = std::underlying_type_t<D>;
return lhs = lhs ^ rhs;
}