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?