C++ - Can type_info::name determine if a type is a pointer?

33 Views Asked by At

I need to categorise a template type in c++. One thing which I need to determine is whether a given type is a pointer - I was wondering if std::type_info::name() would be a suitable way to determine something like that.

This:

std::cout << typeid(T).name();

Appears to work - it appears a P is added before the object class-type, but is this a reliable (and correct) way to implement such a system?

0

There are 0 best solutions below