Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Makes pointer to type from type.
template<class Ty>
struct add_pointer;
Parameters
- Ty
The type to modify.
Remarks
An instance of the type modifier holds the modified-type Ty1* if Ty is of the form Ty1[N] or Ty1&, otherwise Ty*.
Example
// std_tr1__type_traits__add_pointer.cpp
// compile with: /EHsc
#include <type_traits>
#include <iostream>
int main()
{
std::tr1::add_pointer<int>::type *p = (int **)0;
p = p; // to quiet "unused" warning
std::cout << "add_pointer<int> == "
<< typeid(*p).name() << std::endl;
return (0);
}
add_pointer<int> == int *
Requirements
Header: <type_traits>
Namespace: std::tr1