std::remove_reference
From cppreference.com
Defined in header
<type_traits>
|
||
template< class T >
struct remove_reference; |
(since C++11) | |
If the type T
is a reference type, provides the member typedef type
which is the type, referred to by T
. Otherwise type
is T
.
Contents |
[edit] Member types
Name | Definition |
type
|
the type referred by T or T if it is not a reference
|
[edit] Possible implementation
template< class T > struct remove_reference {typedef T type;}; template< class T > struct remove_reference<T&> {typedef T type;}; template< class T > struct remove_reference<T&&> {typedef T type;}; |
[edit] Example
This section is incomplete Reason: no example |
[edit] See also
(C++11)
|
checks if a type is either lvalue reference or rvalue reference (class template) |
(C++11)
(C++11) |
adds lvalue or rvalue reference to the given type (class template) |