This is the reference documentation of sub-namespace enumops
of the ALib C++ Library, which holds types of library module ALib EnumOps.
Extensive documentation for this module is provided with ALib Module Enums - Programmer's Manual.
- Attention
- All operators are declared in the global namespace, other than this namespace documentation indicates!
template<typename TEnum>
requires std::is_enum_v<TEnum>
std::underlying_type_t< TEnum > constexpr alib::enumops::UnderlyingIntegral |
( |
TEnum | element | ) |
|
|
constexprnoexcept |
Simple alias to the nested statement static_cast
and type trait std::underlying_type
, which
- is selected by the compiler only if template parameter TEnum represents an enum type, and
- is probably better readable.
ALib uses this function only in templated code, where the destination type is not determined. In other cases, ALib chooses to convert enum values directly using function-style casts.
- Note
- While documented in namespace
alib::enumops
in fact this function resides in namespace alib.
- See also
- Class Enum introduced with module ALib Boxing.
- Template Parameters
-
TEnum | Enumeration type. Deduced by the compiler. |
- Parameters
-
element | The enumeration element. |
- Returns
true
if all bits of testFor are set in tested.
Definition at line 37 of file underlyingintegral.inl.