|
| FlagEnum () |
| Default constructor. Initializes with no flags set.
|
| FlagEnum (ENUM single_flag) |
| Constructs from a single enum flag.
|
| FlagEnum (const FlagEnum &o) |
| Copy constructor.
|
| ~FlagEnum ()=default |
| Default destructor.
|
constexpr FlagEnum & | operator|= (ENUM addValue) |
| Bitwise OR assignment with an enum value.
|
constexpr FlagEnum & | operator&= (ENUM maskValue) |
| Bitwise AND assignment with an enum value.
|
constexpr bool | operator== (ENUM maskValue) const noexcept |
| Equality comparison with an enum value.
|
| operator bool () const noexcept |
| Boolean conversion operator.
|
template<typename ENUM>
struct templa::FlagEnum< ENUM >
A utility wrapper for using scoped or unscoped enum types as bit flags.
Provides a type-safe way to combine, test, and manipulate enum flags using bitwise operations.
- Template Parameters
-
ENUM | The enumeration type. Must satisfy std::is_enum. |
- Note
- The enum values are implicitly cast to their underlying integral type.