This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

how do I demangle the name from typeinfo(obj).name()?


[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?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]