help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recode "typeinfo::name()" into usable format


From: Grizlyk
Subject: Re: recode "typeinfo::name()" into usable format
Date: 2 Feb 2007 02:03:46 -0800
User-agent: G2/1.0

Paul Pluzhnikov wrote:

>>   // Demangling routines.
>>   char*
>>   __cxa_demangle(const char* __mangled_name, char* __output_buffer,
> >                  size_t* __length, int* __status);
>
> Google finds 
> this:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaceabi.html
>

Well it can work, but it is not so good for templates, because
"__cxa_demangle" makes full name of class with full name of each name
of template parameter, that is why class name can have size about 1000
chars, it is hard to read by human.

If I want to print local name of template (_class name_ or _namespace_
+_class name_), do I need to write simple manual parser for demangled
name or there is gnu (__cxa_???) std parser to dividing full name into
categories: namespaces, name, template parameters?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]