#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.
| typedef T regina::boost::reference_wrapper< T >::type |
The data type being referenced by this wrapper.
| regina::boost::reference_wrapper< T >::reference_wrapper | ( | type & | t | ) | [inline, explicit] |
Creates a new wrapper to reference the given object.
| t | the object to be referenced. |
| regina::boost::reference_wrapper< T >::operator type & | ( | ) | const [inline] |
Returns a reference to the object being referenced.
This routine provides an implicit conversion to type T&.
| type& regina::boost::reference_wrapper< T >::get | ( | ) | const [inline] |
Returns a reference to the object being referenced.
| type* regina::boost::reference_wrapper< T >::get_pointer | ( | ) | const [inline] |
Returns a pointer to the object being referenced.