ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions
aworx::lib::enums::arithmetical Namespace Reference

Operators available to elements of enumerations if T_EnumIsArithmetical 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 lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator%= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator* (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator*= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator+ (TEnum arg) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator+ (TEnum lhs, TEnum rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator+ (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator++ (TEnum &arg) noexcept(true)
 
template<typename TEnum >
ALIB_CPP14_CONSTEXPR TEnum operator++ (TEnum &arg, int) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator+= (TEnum &lhs, TEnum rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator+= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator- (TEnum arg) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator- (TEnum lhs, TEnum rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator- (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator-- (TEnum &arg) noexcept(true)
 
template<typename TEnum >
ALIB_CPP14_CONSTEXPR TEnum operator-- (TEnum &arg, int) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator-= (TEnum &lhs, TEnum rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator-= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator/ (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator/= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr bool operator< (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator<< (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator<<= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr bool operator<= (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr bool operator> (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr bool operator>= (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator>> (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 
template<typename TEnum >
constexpr TEnum operator>>= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept(true)
 

Function Documentation

◆ operator%()

constexpr TEnum aworx::lib::enums::arithmetical::operator% ( TEnum  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Modulo operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 668 of file arithmetical.hpp.

◆ operator%=()

constexpr TEnum aworx::lib::enums::arithmetical::operator%= ( TEnum &  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Modulo assignment operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
[in,out]lhsReference to the first operand. Receives the result.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 693 of file arithmetical.hpp.

◆ operator*()

constexpr TEnum aworx::lib::enums::arithmetical::operator* ( TEnum  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Multiplication operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 569 of file arithmetical.hpp.

◆ operator*=()

constexpr TEnum aworx::lib::enums::arithmetical::operator*= ( TEnum &  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Multiplication assignment operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
[in,out]lhsReference to the first operand. Receives the result.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 594 of file arithmetical.hpp.

◆ operator+() [1/3]

constexpr TEnum aworx::lib::enums::arithmetical::operator+ ( TEnum  arg)
constexprnoexcept

Unary plus operator for enum elements.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
argOperand.
Returns
Parameter arg (identical value).

Definition at line 522 of file arithmetical.hpp.

◆ operator+() [2/3]

constexpr TEnum aworx::lib::enums::arithmetical::operator+ ( TEnum  lhs,
TEnum  rhs 
)
constexprnoexcept

Add operator between two enum elements.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 232 of file arithmetical.hpp.

◆ operator+() [3/3]

constexpr TEnum aworx::lib::enums::arithmetical::operator+ ( TEnum  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Add operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 256 of file arithmetical.hpp.

◆ operator++() [1/2]

constexpr TEnum aworx::lib::enums::arithmetical::operator++ ( TEnum &  arg)
constexprnoexcept

Prefix increment operator.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
[in,out]argReference to the enum value to be incremented.
Returns
The new value of lhs which is set the resulting enum element.

Definition at line 328 of file arithmetical.hpp.

◆ operator++() [2/2]

ALIB_CPP14_CONSTEXPR TEnum aworx::lib::enums::arithmetical::operator++ ( TEnum &  arg,
int   
)
noexcept

Postfix increment operator.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
[in,out]argReference to the enum value to be incremented.
Returns
The old value of arg.

Definition at line 351 of file arithmetical.hpp.

◆ operator+=() [1/2]

constexpr TEnum aworx::lib::enums::arithmetical::operator+= ( TEnum &  lhs,
TEnum  rhs 
)
constexprnoexcept

Add assignment operator between two enum elements.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The new value of lhs which is set the resulting enum element.

Definition at line 281 of file arithmetical.hpp.

◆ operator+=() [2/2]

constexpr TEnum aworx::lib::enums::arithmetical::operator+= ( TEnum &  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Add assignment operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Parameters
[in,out]lhsReference to the first operand. Receives the result.
Template Parameters
TEnumEnumeration type.
Parameters
rhsSecond operand.
Returns
The new value of lhs which is set the resulting enum element.

Definition at line 305 of file arithmetical.hpp.

◆ operator-() [1/3]

constexpr TEnum aworx::lib::enums::arithmetical::operator- ( TEnum  arg)
constexprnoexcept

Unary minus operator for enum elements.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
argOperand.
Returns
The resulting enum element.

Definition at line 544 of file arithmetical.hpp.

◆ operator-() [2/3]

constexpr TEnum aworx::lib::enums::arithmetical::operator- ( TEnum  lhs,
TEnum  rhs 
)
constexprnoexcept

Subtract operator between two enum elements.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 377 of file arithmetical.hpp.

◆ operator-() [3/3]

constexpr TEnum aworx::lib::enums::arithmetical::operator- ( TEnum  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Subtract operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 402 of file arithmetical.hpp.

◆ operator--() [1/2]

constexpr TEnum aworx::lib::enums::arithmetical::operator-- ( TEnum &  arg)
constexprnoexcept

Prefix decrement operator.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
[in,out]argReference to the enum value to be decremented.
Returns
The new value of lhs which is set the resulting enum element.

Definition at line 473 of file arithmetical.hpp.

◆ operator--() [2/2]

ALIB_CPP14_CONSTEXPR TEnum aworx::lib::enums::arithmetical::operator-- ( TEnum &  arg,
int   
)
noexcept

Postfix decrement operator.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
[in,out]argReference to the enum value to be decremented.
Returns
The old value of arg.

Definition at line 497 of file arithmetical.hpp.

◆ operator-=() [1/2]

constexpr TEnum aworx::lib::enums::arithmetical::operator-= ( TEnum &  lhs,
TEnum  rhs 
)
constexprnoexcept

Subtract assignment operator between two enum elements.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The new value of lhs which is set the resulting enum element.

Definition at line 426 of file arithmetical.hpp.

◆ operator-=() [2/2]

constexpr TEnum aworx::lib::enums::arithmetical::operator-= ( TEnum &  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Subtract assignment operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
[in,out]lhsReference to the first operand. Receives the result.
rhsSecond operand.
Returns
The new value of lhs which is set the resulting enum element.

Definition at line 450 of file arithmetical.hpp.

◆ operator/()

constexpr TEnum aworx::lib::enums::arithmetical::operator/ ( TEnum  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Division operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 618 of file arithmetical.hpp.

◆ operator/=()

constexpr TEnum aworx::lib::enums::arithmetical::operator/= ( TEnum &  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Division assignment operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
[in,out]lhsReference to the first operand. Receives the result.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 643 of file arithmetical.hpp.

◆ operator<()

constexpr bool aworx::lib::enums::arithmetical::operator< ( TEnum  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Comparison operator less between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The result of the comparison.

Definition at line 130 of file arithmetical.hpp.

◆ operator<<()

constexpr TEnum aworx::lib::enums::arithmetical::operator<< ( TEnum  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Shift-left operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 718 of file arithmetical.hpp.

◆ operator<<=()

constexpr TEnum aworx::lib::enums::arithmetical::operator<<= ( TEnum &  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Shift-left assignment operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
[in,out]lhsReference to the first operand. Receives the result.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 742 of file arithmetical.hpp.

◆ operator<=()

constexpr bool aworx::lib::enums::arithmetical::operator<= ( TEnum  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Comparison operator less or equal between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The result of the comparison.

Definition at line 155 of file arithmetical.hpp.

◆ operator>()

constexpr bool aworx::lib::enums::arithmetical::operator> ( TEnum  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Comparison operator greater between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The result of the comparison.

Definition at line 180 of file arithmetical.hpp.

◆ operator>=()

constexpr bool aworx::lib::enums::arithmetical::operator>= ( TEnum  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Comparison operator greater or equal between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The result of the comparison.

Definition at line 207 of file arithmetical.hpp.

◆ operator>>()

constexpr TEnum aworx::lib::enums::arithmetical::operator>> ( TEnum  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Shift-right operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
lhsFirst operand.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 767 of file arithmetical.hpp.

◆ operator>>=()

constexpr TEnum aworx::lib::enums::arithmetical::operator>>= ( TEnum &  lhs,
typename std::underlying_type< TEnum >::type  rhs 
)
constexprnoexcept

Shift-right assignment operator between an enum element and an integral value of underlying type.

Selected by the compiler only if T_EnumIsArithmetical is specialized for template enum type TEnum to inherit std::true_type.

Template Parameters
TEnumEnumeration type.
Parameters
[in,out]lhsReference to the first operand. Receives the result.
rhsSecond operand.
Returns
The resulting enum element.

Definition at line 791 of file arithmetical.hpp.