Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Member Functions
ext::reference_wrapper< T > Class Template Reference

Class extending the reference wrapper class from the standard library. Original reason is to allow its use with standard stream aggregation class. More...

#include <functional.hpp>

Inheritance diagram for ext::reference_wrapper< T >:
[legend]
Collaboration diagram for ext::reference_wrapper< T >:
[legend]

Public Member Functions

 reference_wrapper (const reference_wrapper &other)=default
 
reference_wrapperoperator= (const reference_wrapper &other)=default
 
reference_wrapperoperator= (const T &object)
 
auto operator<=> (const reference_wrapper< T > &other) const
 Specialisation of less than operator for reference_wrapper vector. More...
 
bool operator== (const reference_wrapper< T > &other) const
 Specialisation of equals operator for reference_wrapper vector. More...
 

Detailed Description

template<class T>
class ext::reference_wrapper< T >

Class extending the reference wrapper class from the standard library. Original reason is to allow its use with standard stream aggregation class.

The class mimics the behavior of the reference wrapper from the standatd library.

Template Parameters
Tthe type of the reference inside the reference wrapper

Constructor & Destructor Documentation

◆ reference_wrapper()

template<class T >
ext::reference_wrapper< T >::reference_wrapper ( const reference_wrapper< T > &  other)
default

Copy constructor needed by g++ since it is not inherited.

Member Function Documentation

◆ operator<=>()

template<class T >
auto ext::reference_wrapper< T >::operator<=> ( const reference_wrapper< T > &  other) const
inline

Specialisation of less than operator for reference_wrapper vector.

Parameters
otherthe second compared value
Returns
true if the this is smaller than the other, false othervise
Here is the call graph for this function:

◆ operator=() [1/2]

template<class T >
reference_wrapper & ext::reference_wrapper< T >::operator= ( const reference_wrapper< T > &  other)
default

Copy operator = needed by g++ since it is not inherited.

◆ operator=() [2/2]

template<class T >
reference_wrapper & ext::reference_wrapper< T >::operator= ( const T &  object)
inline

Overload to allow wrapping object in assignment.

◆ operator==()

template<class T >
bool ext::reference_wrapper< T >::operator== ( const reference_wrapper< T > &  other) const
inline

Specialisation of equals operator for reference_wrapper vector.

Parameters
otherthe second compared value
Returns
true if the this is equal to the other, false othervise
Here is the call graph for this function:

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