| 1003 | namespace detail |
| 1004 | { |
| 1005 | template<class T> constexpr T enum_bit_or(T a, T b) noexcept |
| 1006 | { |
| 1007 | static_assert(std::is_enum<T>::value, "must be enum"); |
| 1008 | using U = typename std::underlying_type<T>::type; |
| 1009 | return static_cast<T>(static_cast<U>(a) | static_cast<U>(b)); |
| 1010 | } |
| 1011 | template<class T> constexpr T enum_bit_and(T a, T b) noexcept |
| 1012 | { |
| 1013 | static_assert(std::is_enum<T>::value, "must be enum"); |