ALib C++ Library
Library Version: 2402 R1
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 >
constexpr TEnum operator+ (TEnum element, int addend) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator- (TEnum element, int subtrahend) noexcept(true)
 

Function Details:

◆ operator+()

template<typename TEnum >
constexpr TEnum operator+ ( TEnum element,
int addend )
constexprnoexcept

Add operator useable 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.
Parameters
elementFirst operand of TEnum type.
addendThe addend as of int type.
Returns
The "addend-th" enum element after element .

◆ operator-()

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

Subtract operator useable 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.
Parameters
elementFirst operand of TEnum type.
subtrahendThe subtrahend as of int type.
Returns
The "subtrahend-th" enum element before element .