[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
recode "typeinfo::name()" into usable format
From: |
Grizlyk |
Subject: |
recode "typeinfo::name()" into usable format |
Date: |
19 Jan 2007 03:55:58 -0800 |
User-agent: |
G2/1.0 |
Hello.
If I print name of class at runtime, I can use "typeinfo::name()" like
this:
printf( "%s\n", typeid(*this).name() );
And for class named "Tclass" I will get a unreadable g++ specific
formatted sring looks like
"1P2N!@#...Tclass...!@#$"
Also it is well known, that std::unexpected() can print correct name of
class. What function of g++ does correct name demangling?
- recode "typeinfo::name()" into usable format,
Grizlyk <=