A simple type trait that - if specialized - enables standard and range-based C++ iteration of the elements of an enumeration. Specializations have to declare constexpr
fields Begin and End, as documented with this type.
If specialized, the following entities become available:
alib::enumops::iterable
, while in fact they are defined in the global namespace!Restrictions
For technical reasons, this concept is not applicable to enum types that are defined as private
or protected
inner types of structs or classes.
TEnum | The enum type to enable iteration for. |
Definition at line 52 of file iterable.inl.
Public Static Field Index: | |
static constexpr TEnum | Begin |
static constexpr TEnum | End |
|
staticconstexpr |
Specializations have to implement this static method to return the first enum element of the iteration.
Definition at line 59 of file iterable.inl.
|
staticconstexpr |
Specializations have to implement this static method to return the element value after the last enum element of the iteration.
Definition at line 67 of file iterable.inl.