std::reference_wrapper::reference_wrapper

1
reference_wrapper( T& x );
(since C++11)
1
reference_wrapper( T&& x ) = delete;
(since C++11)
1
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
doc_CPP
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.