Is it possible to get a stringified version of a template argument name?
Something like this, if only we were running the preprocessor:
template <typename T>
struct Named{
const char* name(){ return "Named<" #T ">"; }
};
Edit
Duplicate. See here
Stringifying template arguments
No. The closest thing you can have is
typeid(T).name(). However, the result of this is unspecified, even an implementation which returned empty strings for all types would be conforming. For debugging purposes it often is sufficient, though.