std::remove_cvref (3) - Linux Manuals
std::remove_cvref: std::remove_cvref
NAME
std::remove_cvref - std::remove_cvref
Synopsis
Defined in header <type_traits>
template< class T > (since C++20)
struct remove_cvref;
If the type T is a reference type, provides the member typedef type which is the type referred to by T with its topmost cv-qualifiers removed. Otherwise type is T with its topmost cv-qualifiers removed.
Member types
Name Definition
type the type referred by T or T itself if it is not a reference, with top-level cv-qualifiers removed
Helper types
template< class T > (since C++20)
using remove_cvref_t = typename remove_cvref<T>::type;
Possible implementation
Example
// Run this code
Output:
See also
remove_cv
remove_const
remove_volatile removes const or/and volatile specifiers from the given type
(C++11)
(C++11)
(C++11)
remove_reference removes a reference from the given type
(C++11)
decay applies type transformations as when passing a function argument by value
(C++11)