std::reference_wrapper::reference_wrapper - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::reference_wrapper::reference_wrapper

From cppreference.com
< cpp‎ | utility‎ | functional‎ | reference wrapper

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
Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/utility/functional/reference_wrapper/reference_wrapper&oldid=91872"
Category:

- unconditionally noexcept

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template