ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::enumops::arithmetical Namespace Reference

Description:

Operators available to elements of enumerations if ArithmeticalTraits 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>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator% (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator%= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator* (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator*= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator+ (TEnum arg) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator+ (TEnum lhs, TEnum rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator+ (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator++ (TEnum &arg) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator++ (TEnum &arg, typename std::underlying_type< TEnum >::type) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator+= (TEnum &lhs, TEnum rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator+= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator- (TEnum arg) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator- (TEnum lhs, TEnum rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator- (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator-- (TEnum &arg) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator-- (TEnum &arg, typename std::underlying_type< TEnum >::type) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator-= (TEnum &lhs, TEnum rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator-= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator/ (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator/= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr bool operator< (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator<< (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator<<= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr bool operator<= (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr bool operator> (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr bool operator>= (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator>> (TEnum lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 
template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum operator>>= (TEnum &lhs, typename std::underlying_type< TEnum >::type rhs) noexcept
 

Function Details:

◆ operator%()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 ArithmeticalTraits 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 502 of file arithmetical.inl.

◆ operator%=()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 ArithmeticalTraits 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 521 of file arithmetical.inl.

◆ operator*()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 ArithmeticalTraits 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 427 of file arithmetical.inl.

◆ operator*=()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 ArithmeticalTraits 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 446 of file arithmetical.inl.

◆ operator+() [1/3]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::arithmetical::operator+ ( TEnum arg)
constexprnoexcept

Unary plus operator for enum elements.

Selected by the compiler only if ArithmeticalTraits 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 392 of file arithmetical.inl.

◆ operator+() [2/3]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::arithmetical::operator+ ( TEnum lhs,
TEnum rhs )
constexprnoexcept

Add-operator between two enum elements.

Selected by the compiler only if ArithmeticalTraits 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 174 of file arithmetical.inl.

◆ operator+() [3/3]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 ArithmeticalTraits 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 192 of file arithmetical.inl.

◆ operator++() [1/2]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::arithmetical::operator++ ( TEnum & arg)
constexprnoexcept

Prefix increment operator.

Selected by the compiler only if ArithmeticalTraits 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 to the resulting enum element.

Definition at line 246 of file arithmetical.inl.

◆ operator++() [2/2]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::arithmetical::operator++ ( TEnum & arg,
typename std::underlying_type< TEnum >::type  )
constexprnoexcept

Postfix increment operator.

Selected by the compiler only if ArithmeticalTraits 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 263 of file arithmetical.inl.

◆ operator+=() [1/2]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::arithmetical::operator+= ( TEnum & lhs,
TEnum rhs )
constexprnoexcept

Add-assignment-operator between two enum elements.

Selected by the compiler only if ArithmeticalTraits 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 to the resulting enum element.

Definition at line 211 of file arithmetical.inl.

◆ operator+=() [2/2]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 ArithmeticalTraits 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 to the resulting enum element.

Definition at line 229 of file arithmetical.inl.

◆ operator-() [1/3]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::arithmetical::operator- ( TEnum arg)
constexprnoexcept

Unary minus operator for enum elements.

Selected by the compiler only if ArithmeticalTraits 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 408 of file arithmetical.inl.

◆ operator-() [2/3]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::arithmetical::operator- ( TEnum lhs,
TEnum rhs )
constexprnoexcept

Subtract operator between two enum elements.

Selected by the compiler only if ArithmeticalTraits 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 283 of file arithmetical.inl.

◆ operator-() [3/3]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 ArithmeticalTraits 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 302 of file arithmetical.inl.

◆ operator--() [1/2]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::arithmetical::operator-- ( TEnum & arg)
constexprnoexcept

Prefix decrement operator.

Selected by the compiler only if ArithmeticalTraits 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 to the resulting enum element.

Definition at line 355 of file arithmetical.inl.

◆ operator--() [2/2]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::arithmetical::operator-- ( TEnum & arg,
typename std::underlying_type< TEnum >::type  )
constexprnoexcept

Postfix decrement operator.

Selected by the compiler only if ArithmeticalTraits 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 373 of file arithmetical.inl.

◆ operator-=() [1/2]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::arithmetical::operator-= ( TEnum & lhs,
TEnum rhs )
constexprnoexcept

Subtract assignment operator between two enum elements.

Selected by the compiler only if ArithmeticalTraits 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 to the resulting enum element.

Definition at line 320 of file arithmetical.inl.

◆ operator-=() [2/2]

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 ArithmeticalTraits 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 to the resulting enum element.

Definition at line 338 of file arithmetical.inl.

◆ operator/()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 ArithmeticalTraits 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 464 of file arithmetical.inl.

◆ operator/=()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 ArithmeticalTraits 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 483 of file arithmetical.inl.

◆ operator<()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr bool alib::enumops::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 ArithmeticalTraits 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 98 of file arithmetical.inl.

◆ operator<<()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 ArithmeticalTraits 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 540 of file arithmetical.inl.

◆ operator<<=()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 ArithmeticalTraits 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 558 of file arithmetical.inl.

◆ operator<=()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr bool alib::enumops::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 the underlying type.

Selected by the compiler only if ArithmeticalTraits 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 117 of file arithmetical.inl.

◆ operator>()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr bool alib::enumops::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 ArithmeticalTraits 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 136 of file arithmetical.inl.

◆ operator>=()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr bool alib::enumops::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 the underlying type.

Selected by the compiler only if ArithmeticalTraits 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.inl.

◆ operator>>()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 ArithmeticalTraits 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 577 of file arithmetical.inl.

◆ operator>>=()

template<typename TEnum>
requires alib::enumops::IsArithmetical<TEnum>
ALIB_EXPORT constexpr TEnum alib::enumops::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 the underlying type.

Selected by the compiler only if ArithmeticalTraits 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 596 of file arithmetical.inl.