Another alternate could be as follows, though it has it's own downside
map<string, string> classdescrmap; // store association system name, development name
struct A{
A(){
classdescrmap[typeid(*this).name()] = "A";
}
};
struct B : A{
B(){
classdescrmap[typeid(*this).name()] = "B";
}
};
string getname(string const &key){
return classdescrmap[key];
}
int main(){
B b;
cout << getname(typeid(b).name());
}