how do I demangle the name from typeinfo(obj).name()?
David Baraff
deb@pixar.com
Fri Oct 13 13:26:00 GMT 2000
[Apologies for cross-post; couldn't decide which one was really
correct.]
I'm trying to demangle names that come back from typeinfo, e.g.
cout << typeinfo(someObject).name() << "\n";
Some of the things I get out are successfully demangled using the
c++filt program (with
option -edg) but some simple things are not!! I add the required "__"
(two underscores)
but that doesn't always work.
Here are some outputs:
6foobar /* demangles after adding __ */
t4list2Z6foobarZt15TaggedAllocator1Z6foobar /* demangles after
adding __ */
i /* doesn't demangle no matter what */
Fv_i /* doesn't demangle no matter what */
Sadly, the last two cases are, respectively, printing the signatures
of an int, and main.
Could someone PLEASE tell me how to consistently demangle these names?
More information about the Gcc-help
mailing list