regina::boost::reference_wrapper< T > Class Template Reference
Utilities

A wrapper allowing references to be passed through generic functions. More...

`#include <utilities/boostutils.h>`

## Public Types

typedef T | type
| The data type being referenced by this wrapper. More...

## Public Member Functions

| reference_wrapper (type &t)
| Creates a new wrapper to reference the given object. More...
| operator type & () const
| Returns a reference to the object being referenced. More...
type & | get () const
| Returns a reference to the object being referenced. More...
type * | get_pointer () const
| Returns a pointer to the object being referenced. More...

## Detailed Description

### template<class T>
class regina::boost::reference_wrapper< T >

A wrapper allowing references to be passed through generic functions.

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 regina::boost::ref() and regina::boost::cref() for simple creation of these wrappers.

Python:
  Not present.

Author
  This class was taken and modified from the Boost C++ libraries (`http://www.boost.org/`).

## Member Typedef Documentation

template<class T >

typedef T regina::boost::reference_wrapper< T >::type

The data type being referenced by this wrapper.

## Constructor & Destructor Documentation

template<class T >

regina::boost::reference_wrapper< T >::reference_wrapper | ( | type & | t | ) |

inline explicit

Creates a new wrapper to reference the given object.

Parameters

  t | the object to be referenced.

## Member Function Documentation

template<class T >

type& regina::boost::reference_wrapper< T >::get | ( |  | ) | const

inline

Returns a reference to the object being referenced.

Returns
  the corresonding reference.

template<class T >

type* regina::boost::reference_wrapper< T >::get_pointer | ( |  | ) | const

inline

Returns a pointer to the object being referenced.

Returns
  the corresponding pointer.

template<class T >

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&`.

Returns
  the corresonding reference.

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

- utilities/boostutils.h

Copyright © 1999-2014, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).