34 using T = std::underlying_type_t<E>;
35 return static_cast<E
>(
static_cast<T
>(lhs) |
static_cast<T
>(rhs));
41 using T = std::underlying_type_t<E>;
42 return static_cast<E
>(
static_cast<T
>(lhs) &
static_cast<T
>(rhs));
48 using T = std::underlying_type_t<E>;
49 return static_cast<E
>(
static_cast<T
>(lhs) ^
static_cast<T
>(rhs));
55 using T = std::underlying_type_t<E>;
56 return static_cast<E
>(~static_cast<T>(val));
80template<
typename E, std::
integral U>
83 using T = std::underlying_type_t<E>;
84 return static_cast<E
>(
static_cast<T
>(lhs) << shift);
87template<
typename E, std::
integral U>
90 using T = std::underlying_type_t<E>;
91 return static_cast<E
>(
static_cast<T
>(lhs) >> shift);
Definition nl_common.hxx:21
constexpr E operator~(E val)
Definition nl_utils.hxx:54
constexpr E & operator^=(E &lhs, E rhs)
Definition nl_utils.hxx:75
constexpr E & operator|=(E &lhs, E rhs)
Definition nl_utils.hxx:61
constexpr E operator|(E lhs, E rhs)
Definition nl_utils.hxx:33
constexpr bool enable_bitmask_operators_v
Definition nl_utils.hxx:29
constexpr E & operator&=(E &lhs, E rhs)
Definition nl_utils.hxx:68
constexpr E operator<<(E lhs, U shift)
Definition nl_utils.hxx:82
constexpr E operator^(E lhs, E rhs)
Definition nl_utils.hxx:47
constexpr E operator>>(E lhs, U shift)
Definition nl_utils.hxx:89
constexpr E operator&(E lhs, E rhs)
Definition nl_utils.hxx:40
Definition nl_common.hxx:20
Enable bitwise operators for an enum class.
Definition nl_utils.hxx:26