The following code prints out the string "T" not the actual typename when the templated function is called. Is there a way to get the real typename without adding anything to the types being templated?
#define stringify(a) #a
#define tostring(a) stringify(a)
template <typename T>
void function_foo(T a, T b)
{
cout << tostring(T) << endl;
...
}