class template
<type_traits>
std::remove_reference
template <class T> struct remove_reference;
Remove reference
The transformed type is aliased as member type
remove_reference::type.If
T is a reference type (either lvalue reference or rvalue reference), this is the type to which it refers. Otherwise, it is the same as T, unchanged.Notice that this class merely obtains a type using another type as model, but it does not transform values or objects between those types.
Template parameters
- T
- A type.
Member types
| member type | definition |
|---|---|
| type | If T is a reference type, the type referrered to by T. Otherwise, T. |
Example
|
|
Output:
typedefs of int: A: true B: true C: true D: true
See also
- decay
- Decay type (class template)
- remove_pointer
- Remove pointer (class template)
- remove_const
- Remove const qualification (class template)