|
BDE 4.39.x Production Release
|
#include <bslmf_referencewrapper.h>
This class is a copyable, rebindable proxy for a reference to an object or function. It encapsulates a reference into a value that can be reassigned to refer to a different target and can be stored where a native reference cannot, such as in a Standard Library container. A reference_wrapper is implicitly convertible to a reference to the represented type, so it can be passed to functions expecting such a reference.
Public Types | |
| typedef T | type |
Public Member Functions | |
| BSLMF_NESTED_TRAIT_DECLARATION (reference_wrapper, bsl::is_trivially_copyable) | |
| reference_wrapper (T &object) | |
| reference_wrapper (const reference_wrapper &original)=default | |
| ~reference_wrapper ()=default | |
| reference_wrapper & | operator= (const reference_wrapper &rhs)=default |
| T & | get () const |
| operator T& () const | |
| typedef T bsl::reference_wrapper< T >::type |
|
default |
Create a reference wrapper referring to the same object as the specified original.
|
default |
Destroy this object.
| bsl::reference_wrapper< T >::BSLMF_NESTED_TRAIT_DECLARATION | ( | reference_wrapper< T > | , |
| bsl::is_trivially_copyable | |||
| ) |
|
default |
Assign this object to refer to the same object as the specified rhs, and return *this.