Namespaces
Variants
Views
Actions

std::reference_wrapper::reference_wrapper

From cppreference.com
< cpp‎ | utility‎ | functional‎ | reference wrapper
Revision as of 13:37, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
Function objects


Function wrappers
(C++11)
(C++11)
Bind
(C++11)
Reference wrappers
(C++11)(C++11)
Operator wrappers
Negators
Deprecated binders and adaptors
(deprecated)
(deprecated)
(deprecated)
(deprecated)
(deprecated)(deprecated)(deprecated)(deprecated)
(deprecated)
(deprecated)(deprecated)(deprecated)(deprecated)
(deprecated)(deprecated)
(deprecated)(deprecated)
 
 

Template:ddcl list begin <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
reference_wrapper( T& x );
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
reference_wrapper( T&& x ) = delete;
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
reference_wrapper( const reference_wrapper<T>& other );
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> Template:ddcl list end

Constructs a new reference wrapper.

1) Stores a reference to x.

2) Construction from a temporary objects is not allowed.

3) Copy constructor. Stores a reference to other.get().

Parameters

x - an object to wrap
other - another reference wrapper

Exceptions

noexcept specification:  
noexcept