Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
toolbox::util::IntWrapper< PolicyT > Struct Template Reference

#include <toolbox/util/IntTypes.hpp>

Public Types

using ValueType = typename PolicyT::ValueType
 

Public Member Functions

template<typename RhsT >
requires std::convertible_to<RhsT, ValueType>
constexpr IntWrapper (RhsT rhs) noexcept
 
constexpr IntWrapper () noexcept=default
 
 ~IntWrapper ()=default
 
constexpr IntWrapper (const IntWrapper &) noexcept=default
 
constexpr IntWrapperoperator= (const IntWrapper &) noexcept=default
 
constexpr IntWrapper (IntWrapper &&) noexcept=default
 
constexpr IntWrapperoperator= (IntWrapper &&) noexcept=default
 
constexpr ValueType count () const noexcept
 
constexpr IntWrapperoperator+= (IntWrapper rhs) noexcept
 Addition assignment.
 
constexpr IntWrapperoperator-= (IntWrapper rhs) noexcept
 Subtraction assignment.
 
constexpr IntWrapperoperator*= (IntWrapper rhs) noexcept
 Multiplication assignment.
 
constexpr IntWrapperoperator/= (IntWrapper rhs) noexcept
 Division assignment.
 
constexpr IntWrapperoperator%= (IntWrapper rhs) noexcept
 Modulo assignment.
 
constexpr IntWrapperoperator&= (IntWrapper rhs) noexcept
 Bitwise AND assignment.
 
constexpr IntWrapperoperator|= (IntWrapper rhs) noexcept
 Bitwise OR assignment.
 
constexpr IntWrapperoperator^= (IntWrapper rhs) noexcept
 Bitwise XOR assignment.
 
constexpr IntWrapperoperator<<= (IntWrapper rhs) noexcept
 Bitwise left shift assignment.
 
constexpr IntWrapperoperator>>= (IntWrapper rhs) noexcept
 Bitwise right shift assignment.
 
constexpr IntWrapperoperator++ () noexcept
 Pre-increment.
 
constexpr IntWrapperoperator-- () noexcept
 Pre-decrement.
 
constexpr IntWrapper operator++ (int) noexcept
 Post-increment.
 
constexpr IntWrapper operator-- (int) noexcept
 Post-decrement.
 
constexpr IntWrapper operator+ () const noexcept
 Unary plus.
 
constexpr IntWrapper operator- () const noexcept
 Unary minus.
 
constexpr IntWrapper operator~ () const noexcept
 Bitwise NOT.
 

Static Public Member Functions

static constexpr IntWrapper min () noexcept
 
static constexpr IntWrapper max () noexcept
 
static constexpr IntWrapper zero () noexcept
 

Friends

constexpr IntWrapper operator+ (IntWrapper lhs, IntWrapper rhs) noexcept
 Addition.
 
constexpr IntWrapper operator- (IntWrapper lhs, IntWrapper rhs) noexcept
 Subtraction.
 
constexpr IntWrapper operator* (IntWrapper lhs, IntWrapper rhs) noexcept
 Multiplication.
 
constexpr IntWrapper operator/ (IntWrapper lhs, IntWrapper rhs) noexcept
 Division.
 
constexpr IntWrapper operator% (IntWrapper lhs, IntWrapper rhs) noexcept
 Modulo.
 
constexpr IntWrapper operator& (IntWrapper lhs, IntWrapper rhs) noexcept
 Bitwise AND.
 
constexpr IntWrapper operator| (IntWrapper lhs, IntWrapper rhs) noexcept
 Bitwise OR.
 
constexpr IntWrapper operator^ (IntWrapper lhs, IntWrapper rhs) noexcept
 Bitwise XOR.
 
constexpr IntWrapper operator<< (IntWrapper lhs, IntWrapper rhs) noexcept
 Bitwise left shift.
 
constexpr IntWrapper operator>> (IntWrapper lhs, IntWrapper rhs) noexcept
 Bitwise right shift.
 
constexpr auto operator<=> (const IntWrapper &, const IntWrapper &) noexcept=default
 
constexpr bool operator== (const IntWrapper &, const IntWrapper &) noexcept=default
 
constexpr std::ostream & operator<< (std::ostream &os, IntWrapper rhs)
 Insertion.
 

Detailed Description

template<typename PolicyT>
struct toolbox::util::IntWrapper< PolicyT >

Definition at line 38 of file IntTypes.hpp.

Member Typedef Documentation

◆ ValueType

template<typename PolicyT >
using toolbox::util::IntWrapper< PolicyT >::ValueType = typename PolicyT::ValueType

Definition at line 39 of file IntTypes.hpp.

Constructor & Destructor Documentation

◆ IntWrapper() [1/4]

template<typename PolicyT >
template<typename RhsT >
requires std::convertible_to<RhsT, ValueType>
constexpr toolbox::util::IntWrapper< PolicyT >::IntWrapper ( RhsT  rhs)
inlineexplicitconstexprnoexcept

Definition at line 43 of file IntTypes.hpp.

◆ IntWrapper() [2/4]

template<typename PolicyT >
constexpr toolbox::util::IntWrapper< PolicyT >::IntWrapper ( )
constexprdefaultnoexcept

◆ ~IntWrapper()

◆ IntWrapper() [3/4]

template<typename PolicyT >
constexpr toolbox::util::IntWrapper< PolicyT >::IntWrapper ( const IntWrapper< PolicyT > &  )
constexprdefaultnoexcept

◆ IntWrapper() [4/4]

template<typename PolicyT >
constexpr toolbox::util::IntWrapper< PolicyT >::IntWrapper ( IntWrapper< PolicyT > &&  )
constexprdefaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

◆ operator=() [2/2]

template<typename PolicyT >
constexpr IntWrapper & toolbox::util::IntWrapper< PolicyT >::operator= ( IntWrapper< PolicyT > &&  )
constexprdefaultnoexcept

◆ count()

template<typename PolicyT >
constexpr ValueType toolbox::util::IntWrapper< PolicyT >::count ( ) const
inlineconstexprnoexcept

◆ min()

template<typename PolicyT >
static constexpr IntWrapper toolbox::util::IntWrapper< PolicyT >::min ( )
inlinestaticconstexprnoexcept

Definition at line 61 of file IntTypes.hpp.

◆ max()

template<typename PolicyT >
static constexpr IntWrapper toolbox::util::IntWrapper< PolicyT >::max ( )
inlinestaticconstexprnoexcept

Definition at line 62 of file IntTypes.hpp.

◆ zero()

template<typename PolicyT >
static constexpr IntWrapper toolbox::util::IntWrapper< PolicyT >::zero ( )
inlinestaticconstexprnoexcept

Definition at line 63 of file IntTypes.hpp.

◆ operator+=()

template<typename PolicyT >
constexpr IntWrapper & toolbox::util::IntWrapper< PolicyT >::operator+= ( IntWrapper< PolicyT rhs)
inlineconstexprnoexcept

Addition assignment.

Definition at line 68 of file IntTypes.hpp.

◆ operator-=()

template<typename PolicyT >
constexpr IntWrapper & toolbox::util::IntWrapper< PolicyT >::operator-= ( IntWrapper< PolicyT rhs)
inlineconstexprnoexcept

Subtraction assignment.

Definition at line 75 of file IntTypes.hpp.

◆ operator*=()

template<typename PolicyT >
constexpr IntWrapper & toolbox::util::IntWrapper< PolicyT >::operator*= ( IntWrapper< PolicyT rhs)
inlineconstexprnoexcept

Multiplication assignment.

Definition at line 82 of file IntTypes.hpp.

◆ operator/=()

template<typename PolicyT >
constexpr IntWrapper & toolbox::util::IntWrapper< PolicyT >::operator/= ( IntWrapper< PolicyT rhs)
inlineconstexprnoexcept

Division assignment.

Definition at line 89 of file IntTypes.hpp.

◆ operator%=()

template<typename PolicyT >
constexpr IntWrapper & toolbox::util::IntWrapper< PolicyT >::operator%= ( IntWrapper< PolicyT rhs)
inlineconstexprnoexcept

Modulo assignment.

Definition at line 96 of file IntTypes.hpp.

◆ operator&=()

template<typename PolicyT >
constexpr IntWrapper & toolbox::util::IntWrapper< PolicyT >::operator&= ( IntWrapper< PolicyT rhs)
inlineconstexprnoexcept

Bitwise AND assignment.

Definition at line 103 of file IntTypes.hpp.

◆ operator|=()

template<typename PolicyT >
constexpr IntWrapper & toolbox::util::IntWrapper< PolicyT >::operator|= ( IntWrapper< PolicyT rhs)
inlineconstexprnoexcept

Bitwise OR assignment.

Definition at line 110 of file IntTypes.hpp.

◆ operator^=()

template<typename PolicyT >
constexpr IntWrapper & toolbox::util::IntWrapper< PolicyT >::operator^= ( IntWrapper< PolicyT rhs)
inlineconstexprnoexcept

Bitwise XOR assignment.

Definition at line 117 of file IntTypes.hpp.

◆ operator<<=()

template<typename PolicyT >
constexpr IntWrapper & toolbox::util::IntWrapper< PolicyT >::operator<<= ( IntWrapper< PolicyT rhs)
inlineconstexprnoexcept

Bitwise left shift assignment.

Definition at line 124 of file IntTypes.hpp.

◆ operator>>=()

template<typename PolicyT >
constexpr IntWrapper & toolbox::util::IntWrapper< PolicyT >::operator>>= ( IntWrapper< PolicyT rhs)
inlineconstexprnoexcept

Bitwise right shift assignment.

Definition at line 131 of file IntTypes.hpp.

◆ operator++() [1/2]

template<typename PolicyT >
constexpr IntWrapper & toolbox::util::IntWrapper< PolicyT >::operator++ ( )
inlineconstexprnoexcept

Pre-increment.

Definition at line 140 of file IntTypes.hpp.

◆ operator--() [1/2]

template<typename PolicyT >
constexpr IntWrapper & toolbox::util::IntWrapper< PolicyT >::operator-- ( )
inlineconstexprnoexcept

Pre-decrement.

Definition at line 147 of file IntTypes.hpp.

◆ operator++() [2/2]

template<typename PolicyT >
constexpr IntWrapper toolbox::util::IntWrapper< PolicyT >::operator++ ( int  )
inlineconstexprnoexcept

Post-increment.

Definition at line 154 of file IntTypes.hpp.

◆ operator--() [2/2]

template<typename PolicyT >
constexpr IntWrapper toolbox::util::IntWrapper< PolicyT >::operator-- ( int  )
inlineconstexprnoexcept

Post-decrement.

Definition at line 157 of file IntTypes.hpp.

◆ operator+()

template<typename PolicyT >
constexpr IntWrapper toolbox::util::IntWrapper< PolicyT >::operator+ ( ) const
inlineconstexprnoexcept

Unary plus.

Definition at line 162 of file IntTypes.hpp.

◆ operator-()

template<typename PolicyT >
constexpr IntWrapper toolbox::util::IntWrapper< PolicyT >::operator- ( ) const
inlineconstexprnoexcept

Unary minus.

Definition at line 165 of file IntTypes.hpp.

◆ operator~()

template<typename PolicyT >
constexpr IntWrapper toolbox::util::IntWrapper< PolicyT >::operator~ ( ) const
inlineconstexprnoexcept

Bitwise NOT.

Definition at line 200 of file IntTypes.hpp.

Friends And Related Symbol Documentation

◆ operator+

template<typename PolicyT >
constexpr IntWrapper operator+ ( IntWrapper< PolicyT lhs,
IntWrapper< PolicyT rhs 
)
friend

Addition.

Definition at line 168 of file IntTypes.hpp.

◆ operator-

template<typename PolicyT >
constexpr IntWrapper operator- ( IntWrapper< PolicyT lhs,
IntWrapper< PolicyT rhs 
)
friend

Subtraction.

Definition at line 174 of file IntTypes.hpp.

◆ operator*

template<typename PolicyT >
constexpr IntWrapper operator* ( IntWrapper< PolicyT lhs,
IntWrapper< PolicyT rhs 
)
friend

Multiplication.

Definition at line 180 of file IntTypes.hpp.

◆ operator/

template<typename PolicyT >
constexpr IntWrapper operator/ ( IntWrapper< PolicyT lhs,
IntWrapper< PolicyT rhs 
)
friend

Division.

Definition at line 186 of file IntTypes.hpp.

◆ operator%

template<typename PolicyT >
constexpr IntWrapper operator% ( IntWrapper< PolicyT lhs,
IntWrapper< PolicyT rhs 
)
friend

Modulo.

Definition at line 192 of file IntTypes.hpp.

◆ operator&

template<typename PolicyT >
constexpr IntWrapper operator& ( IntWrapper< PolicyT lhs,
IntWrapper< PolicyT rhs 
)
friend

Bitwise AND.

Definition at line 203 of file IntTypes.hpp.

◆ operator|

template<typename PolicyT >
constexpr IntWrapper operator| ( IntWrapper< PolicyT lhs,
IntWrapper< PolicyT rhs 
)
friend

Bitwise OR.

Definition at line 209 of file IntTypes.hpp.

◆ operator^

template<typename PolicyT >
constexpr IntWrapper operator^ ( IntWrapper< PolicyT lhs,
IntWrapper< PolicyT rhs 
)
friend

Bitwise XOR.

Definition at line 215 of file IntTypes.hpp.

◆ operator<< [1/2]

template<typename PolicyT >
constexpr IntWrapper operator<< ( IntWrapper< PolicyT lhs,
IntWrapper< PolicyT rhs 
)
friend

Bitwise left shift.

Definition at line 221 of file IntTypes.hpp.

◆ operator>>

template<typename PolicyT >
constexpr IntWrapper operator>> ( IntWrapper< PolicyT lhs,
IntWrapper< PolicyT rhs 
)
friend

Bitwise right shift.

Definition at line 227 of file IntTypes.hpp.

◆ operator<=>

template<typename PolicyT >
constexpr auto operator<=> ( const IntWrapper< PolicyT > &  ,
const IntWrapper< PolicyT > &   
)
friend

◆ operator==

template<typename PolicyT >
constexpr bool operator== ( const IntWrapper< PolicyT > &  ,
const IntWrapper< PolicyT > &   
)
friend

◆ operator<< [2/2]

template<typename PolicyT >
constexpr std::ostream & operator<< ( std::ostream &  os,
IntWrapper< PolicyT rhs 
)
friend

Insertion.

Definition at line 239 of file IntTypes.hpp.


The documentation for this struct was generated from the following file: