std::reference_wrapper::reference_wrapper

std::reference_wrapper::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().

Parameters

x - an object to wrap
other - another reference wrapper

Exceptions

noexcept specification:
noexcept

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/utility/functional/reference_wrapper/reference_wrapper

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部