template <class T> struct is_pointer;
12345678910111213
// is_pointer example #include <iostream> #include <type_traits> int main() { std::cout << std::boolalpha; std::cout << "is_pointer:" << std::endl; std::cout << "int: " << std::is_pointer<int>::value << std::endl; std::cout << "int*: " << std::is_pointer<int*>::value << std::endl; std::cout << "int**: " << std::is_pointer<int**>::value << std::endl; std::cout << "int(*)(int): " << std::is_pointer<int(*)(int)>::value << std::endl; return 0; }
is_pointer: int: false int*: true int**: true int(*)(int): true