I have code something like this
template <typename T> void fun (T value)
{
.....
value.print (); //Here if T is a class I want to call print (),
//otherwise use printf
.....
}
Now, to print the value, if T is a class, I want to call the print function of the object, but if T is a basic datatype, I just want to use printf.
So, how do I find if the Template type is a basic data type or a class?