Namespaces
Variants
Views
Actions

std::reference_wrapper::reference_wrapper

From cppreference.com
< cpp‎ | utility‎ | functional‎ | reference wrapper
Revision as of 13:13, 2 August 2013 by 216.16.254.41 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 
 
 
Function objects
Function wrappers
(C++11)
(C++11)
Bind
(C++11)
Reference wrappers
(C++11)(C++11)
Operator wrappers
Negators
Deprecated binders and adaptors
(until C++17)
(until C++17)
(until C++17)
(until C++17)
(until C++17)(until C++17)(until C++17)(until C++17)
(until C++17)
(until C++17)(until C++17)(until C++17)(until C++17)
(until C++17)(until C++17)
(until C++17)(until C++17)
 
 
reference_wrapper( T& x );
(since C++11)
reference_wrapper( T&& x ) = delete;
(since C++11)
reference_wrapper( const reference_wrapper<T>& other );
(since C++11)

Constructs a new reference wrapper.

1) Stores a reference to x.

2) Construction from a temporary object is not allowed.

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

[edit] Parameters

x - an object to wrap
other - another reference wrapper

[edit] Exceptions

noexcept specification:  
noexcept