|
| enum_flag ()=default |
| Default constructor initializes with no flags set.
|
| enum_flag (T initial) |
| Constructs enum_flag with an initial flag value.
|
enum_flag & | operator= (T flags) |
| Assignment operator from enum type.
|
constexpr enum_flag & | operator|= (T fs) |
| Bitwise OR assignment operator to add flags.
|
constexpr enum_flag & | operator&= (T fs) |
| Bitwise AND assignment operator to mask flags.
|
template<typename U> |
constexpr bool | has (U e) const noexcept |
| Checks if this enum_flag contains all bits of a given flag.
|
template<typename... Args> |
constexpr bool | has_any (Args &&...args) const noexcept |
| Checks if this enum_flag contains any of the specified flags.
|
template<typename... Args> |
constexpr bool | has_all (Args &&...args) const noexcept |
| Checks if this enum_flag contains all of the specified flags.
|
constexpr bool | operator== (const enum_flag< T > &other) const noexcept |
| Equality operator.
|
constexpr bool | operator!= (const enum_flag< T > &other) const noexcept |
| Inequality operator.
|
constexpr bool | operator() () const noexcept |
| Boolean conversion operator indicating if any flag is set.
|
| ~enum_flag ()=default |
| Destructor.
|
template<typename T>
requires (traits::Flaggable<T>)
class circus::utils::enum_flag< T >
A utility class for strongly typed enum flags with bitwise operations.
- Template Parameters
-
T | Enum type that meets the traits::Flaggable concept (must be enum with underlying type uint32_t or uint64_t). |
This class wraps an enum type and provides bitwise flag manipulation methods and checks such as has, has_any, and has_all.