Iros
 
Loading...
Searching...
No Matches
bitwise_enum.h File Reference

Go to the source code of this file.

Macros

#define DI_DEFINE_ENUM_BITWISE_OPERATIONS(Type)
 

Macro Definition Documentation

◆ DI_DEFINE_ENUM_BITWISE_OPERATIONS

#define DI_DEFINE_ENUM_BITWISE_OPERATIONS ( Type)
Value:
static_assert(::di::concepts::Enum<Type>); \
constexpr auto operator~(Type a)->Type { \
return static_cast<Type>(~::di::util::to_underlying(a)); \
} \
constexpr auto operator|(Type a, Type b)->Type { \
return static_cast<Type>(::di::util::to_underlying(a) | ::di::util::to_underlying(b)); \
} \
constexpr auto operator&(Type a, Type b)->Type { \
} \
constexpr auto operator^(Type a, Type b)->Type { \
} \
constexpr auto operator|=(Type& a, Type b)->Type& { \
return a = a | b; \
} \
constexpr auto operator&=(Type& a, Type b)->Type& { \
return a = a & b; \
} \
constexpr auto operator^=(Type& a, Type b)->Type& { \
return a = a ^ b; \
} \
constexpr auto operator!(Type a)->bool { \
}
constexpr auto operator&(M &&m, F &&f) -> decltype(fmap_right(util::forward< M >(m), util::forward< F >(f)))
Definition monad_operator.h:27
constexpr auto to_underlying
Definition to_underlying.h:15
Type
Definition initrd.h:13