10 Nov
2005
10 Nov
'05
5:09 p.m.
Dear Chris, maybe I am obsessed ... but what about the following variant (I had this version first but then decided to put a more *polished* version on the list...): class SOMECLASS { public: const static char* tinfo_name; const static unsigned tinfo; virtual const unsigned int id() { return (unsigned int)SOMECLASS::tinfo_name; } }; const char* SOMECLASS::tinfo_name = "SOMECLASS"; const unsigned SOMECLASS::tinfo = (unsigned)SOMECLASS::tinfo_name; Well, the unsigned tinfo variable is maybe not necessary. And if tinfo() in every ginac class would return char* no casting would be necessary from the start. Regards, Jens