std::remove_pointer
From cppreference.com
Defined in header <type_traits>
|
||
template< class T > struct remove_pointer; |
(since C++11) | |
Provides the member typedef type which is the type pointed to by T, or, if T is not a pointer, then type is the same as T.
Contents |
[edit] Member types
Name | Definition |
type | the type pointed to by T or T if it's not a pointer |
[edit] Possible implementation
template< class T > struct remove_pointer {typedef T type;}; template< class T > struct remove_pointer<T*> {typedef T type;}; template< class T > struct remove_pointer<T* const> {typedef T type;}; template< class T > struct remove_pointer<T* volatile> {typedef T type;}; template< class T > struct remove_pointer<T* const volatile> {typedef T type;}; |
[edit] Example
This section is incomplete Reason: no example |
[edit] See also
(C++11) |
checks if a type is a pointer type (class template) |
(C++11) |
adds pointer to the given type (class template) |