Well, I just thought about a possible solution: A macro like this one:
1 2 3 4 5 6 7 8 9
#define DECLARE_CIRCLE(X) typedef Circle<X, #X> Circle##X
//And modify the Circle template to accept a char*:
template<class X, constchar *N, class T = point<X>>
class Circle : public Shape
{
constchar *_typeName = N;
...
};
Then the class is declared through the macro. If you type DECLARE_CIRCLE(int); you'll have a class called Circleint with a private field called _typeName pointing to the string "int".
Did not test it, but I think it works. Maybe this helps.