#include <boostutils.h>
Public Types | |
typedef T | type |
The data type being referenced by this wrapper. | |
Public Member Functions | |
reference_wrapper (type &t) | |
Creates a new wrapper to reference the given object. | |
operator type & () const | |
Returns a reference to the object being referenced. | |
type & | get () const |
Returns a reference to the object being referenced. | |
type * | get_pointer () const |
Returns a pointer to the object being referenced. |
This class is for use with the Standard Template Library.
The primary advantage of this class is its implicit conversion to type T&
. Thus it can be passed to routines expecting references to T
but can also be passed by reference itself.
See global routines ref() and cref() for simple creation of these wrappers.
http://www.boost.org/
).
|
The data type being referenced by this wrapper.
|
|
Creates a new wrapper to reference the given object.
|
|
Returns a reference to the object being referenced.
|
|
Returns a pointer to the object being referenced.
|
|
Returns a reference to the object being referenced.
This routine provides an implicit conversion to type
|