std::unwrap_reference,std::unwrap_ref_decay (3) - Linux Manuals
std::unwrap_reference,std::unwrap_ref_decay: std::unwrap_reference,std::unwrap_ref_decay
NAME
std::unwrap_reference,std::unwrap_ref_decay - std::unwrap_reference,std::unwrap_ref_decay
Synopsis
Defined in header <functional>
template< class T > (1) (since C++20)
struct unwrap_reference;
template< class T > (2) (since C++20)
struct unwrap_ref_decay : std::unwrap_reference<std::decay_t<T>> {};
1) If T is std::reference_wrapper<U> for some type U, provides a member typedef type that names U&; otherwise, provides a member typedef type that names T.
2) If T is std::reference_wrapper<U> for some type U, ignoring cv-qualification and referenceness, provides a member typedef type that names U&; otherwise, provides a member typedef type that names std::decay_t<T>.
Member types
Name Definition
type 1) U& if T is std::reference_wrapper<U>; T otherwise
Helper types
template<class T> (since C++20)
using unwrap_ref_decay_t = typename unwrap_ref_decay<T>::type;
Possible implementation
Notes
std::unwrap_ref_decay performs the same transformation as used by std::make_pair and std::make_tuple.
Example
This section is incomplete
Reason: no example
See also
reference_wrapper CopyConstructible and CopyAssignable reference wrapper
(C++11)
make_pair (function template)
make_tuple (function template)