ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Functions
aworx::lib::enums::iterable Namespace Reference

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.

Functions

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 Documentation

◆ operator+()

constexpr TEnum aworx::lib::enums::iterable::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-()

constexpr TEnum aworx::lib::enums::iterable::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 .