|
| constexpr | EnumBitSet (Tenum value) |
| |
| constexpr | EnumBitSet (Tstorage data) |
| |
| constexpr | EnumBitSet (std::initializer_list< const Tenum > values) |
| | Construct an EnumBitSet from a list of enum values.
|
| |
|
constexpr auto | operator<=> (const EnumBitSet &) const noexcept=default |
| |
| constexpr | BaseBitSet (Tstorage data) |
| |
|
constexpr auto | operator<=> (const BaseBitSet &) const noexcept=default |
| |
| constexpr Timpl & | Set () |
| | Set all bits.
|
| |
| constexpr Timpl & | Set (Tvalue_type value) |
| | Set the value-th bit.
|
| |
| constexpr Timpl & | Set (const Timpl &other) |
| | Set values from another bitset.
|
| |
| constexpr Timpl & | Set (Tvalue_type value, bool set) |
| | Assign the value-th bit.
|
| |
| constexpr Timpl & | Reset () |
| | Reset all bits.
|
| |
| constexpr Timpl & | Reset (Tvalue_type value) |
| | Reset the value-th bit.
|
| |
| constexpr Timpl & | Reset (const Timpl &other) |
| | Reset values from another bitset.
|
| |
| constexpr Timpl & | Flip (Tvalue_type value) |
| | Flip the value-th bit.
|
| |
| constexpr Timpl & | Flip (const Timpl &other) |
| | Flip values from another bitset.
|
| |
| constexpr bool | Test (Tvalue_type value) const |
| | Test if the value-th bit is set.
|
| |
| constexpr bool | All (const Timpl &other) const |
| | Test if all of the values are set.
|
| |
| constexpr bool | All () const |
| | Test if all of the values are set.
|
| |
| constexpr bool | Any (const Timpl &other) const |
| | Test if any of the given values are set.
|
| |
| constexpr bool | Any () const |
| | Test if any of the values are set.
|
| |
| constexpr bool | None () const |
| | Test if none of the values are set.
|
| |
| constexpr Timpl & | operator|= (const Timpl &other) |
| |
| constexpr Timpl | operator| (const Timpl &other) const |
| |
| constexpr Timpl & | operator&= (const Timpl &other) |
| |
| constexpr Timpl | operator& (const Timpl &other) const |
| |
| constexpr Tstorage | base () const noexcept |
| | Retrieve the raw value behind this bit set.
|
| |
| constexpr bool | IsValid () const |
| | Test that the raw value of this bit set is valid.
|
| |
| uint | Count () const |
| | Count the number of set bits.
|
| |
| std::optional< Tvalue_type > | GetNthSetBit (uint n) const |
| | Get the value of the Nth set bit.
|
| |
| auto | begin () const |
| |
| auto | end () const |
| |
template<typename Tenum, typename Tstorage, Tenum Tend_value = Tenum{std::numeric_limits<Tstorage>::digits}>
class EnumBitSet< Tenum, Tstorage, Tend_value >
Enum-as-bit-set wrapper.
Allows wrapping enum values as a bit set. Methods are loosely modelled on std::bitset.
- Note
- Only set Tend_value if the bitset needs to be automatically masked to valid values.
- Template Parameters
-
| Tenum | Enum values to wrap. |
| Tstorage | Storage type required to hold eenum values. |
| Tend_value | Last valid value + 1. |
Definition at line 177 of file enum_type.hpp.