Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

remove_pointer Class

Makes type from pointer to type.

template<class Ty>
    struct remove_pointer;


The type to modify.

An instance of the type modifier holds a modified-type that is Ty1 when Ty is of the form Ty1*, Ty1* const, Ty1* volatile, or Ty1* const volatile, otherwise Ty.


// std_tr1__type_traits__remove_pointer.cpp 
// compile with: /EHsc 
#include <type_traits> 
#include <iostream> 
int main() 
    int *p = (std::remove_pointer<int *>::type *)0; 
    p = p;  // to quiet "unused" warning 
    std::cout << "remove_pointer<int *> == " 
        << typeid(*p).name() << std::endl; 
    return (0); 
remove_pointer<int *> == int

Header: <type_traits>

Namespace: std

Community Additions

© 2015 Microsoft