howto demangle const types?

Larry Evans cppljevans@suddenlink.net
Thu Feb 3 04:51:00 GMT 2011


On 02/02/11 16:38, Larry Evans wrote:
> The attached code produces output:
> 
> int const=int
> 
> IOW, the abi::__cxa_demangle strips const qualifiers.
> 
[snip]

With Ian's help, I found the reason for the stripping
of qualifiers.

It's not abi::__cxa_demangle which strips the qualifier,
it's the typeid, which conforms to the standard as
expressed in working paper, n3035, which, in
section 5.2.8p4, says typeid returns a type_info object
"representing the cv-unqualified referenced type".
                     ^^

Thanks Ian.

-regards,
Larry



More information about the Gcc-help mailing list