ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::enums::iterable Namespace Reference

Description:

Operators available to elements of enumerations if T_EnumIsIterable is specialized.

Note
This namespace exits only in the documentation to collect the operators. When parsed by a C++ compiler, the operators reside in the global namespace.

Function Index:

template<typename TEnum , typename TRhs = int>
constexpr TEnum operator+ (TEnum element, TRhs summand) noexcept
 
template<typename TEnum , typename TRhs = int>
constexpr TEnum operator- (TEnum element, TRhs subtrahend) noexcept
 

Function Details:

◆ operator+()

template<typename TEnum , typename TRhs = int>
TEnum operator+ ( TEnum element,
TRhs summand )
constexprnoexcept

Add operator usable with scoped enum types and integral values.

Selected by the compiler only if T_EnumIsIterable is specialized for enum type TEnum.

Template Parameters
TEnumEnumeration type.
TRhsThe type of the summand.
Parameters
elementFirst operand of TEnum type.
summandThe summand.
Returns
The "summand-th" enum element after element .

◆ operator-()

template<typename TEnum , typename TRhs = int>
TEnum operator- ( TEnum element,
TRhs subtrahend )
constexprnoexcept

Subtract operator usable with scoped enum types and integral values.

Selected by the compiler only if T_EnumIsIterable is specialized for enum type TEnum.

Template Parameters
TEnumEnumeration type.
TRhsThe type of the subtrahend.
Parameters
elementFirst operand of TEnum type.
subtrahendThe subtrahend.
Returns
The "subtrahend-th" enum element before element .