cxxomfort
rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
|
std::reference_wrapper<T> implementation More...
Public Member Functions | |
reference_wrapper (reference_wrapper const &R) CXXO_NOEXCEPTNOTHROW | |
copy-ctor | |
reference_wrapper & | operator= (reference_wrapper const &R) CXXO_NOEXCEPTNOTHROW |
Assignment operator. | |
T & | get () const CXXO_NOEXCEPTNOTHROW |
access the referenced object | |
operator T & () const CXXO_NOEXCEPTNOTHROW | |
access the referenced object | |
template<typename... Args> | |
undefined_type_t | operator() (Args... args) const |
Invoke using the referenced object, if capable. | |
std::reference_wrapper<T> implementation
"std::reference_wrapper"
A reference_wrapper
hosts a reference to an object in the same way a normal reference does, but separates assignment mechanics so that assigning to the wrapper changes whichobject is hosted, instead of changing the object itself. It basically behaves as a pointer-to-T.