This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: type_info::name question
- To: kunert at physik dot tu-dresden dot de (Thomas Kunert), egcs at cygnus dot com
- Subject: Re: type_info::name question
- From: Jason Merrill <jason at cygnus dot com>
- Date: 21 Sep 1998 12:09:50 -0700
- References: <Pine.LNX.3.96.980914113704.404A-100000@rumcajs.chemie.uni-halle.de> <35FF61BF.301D5EC7.cygnus.egcs@physik.tu-dresden.de>
>>>>> Thomas Kunert <kunert@physik.tu-dresden.de> writes:
> Alexandre Oliva wrote:
>>
>> Ryszard Kabatek <rysio@rumcajs.chemie.uni-halle.de> writes:
>>
>> > Is there any possibility to get the class name from type_info::name?
>>
>> You might run `c++filt' and feed it the result of type_info::name(),
>> but you may prefer to create a library containing the unmangler
>> functions from c++filt and link your program with it.
> IMHO, type_info::name isn't useful at all if it returns some cryptic
> string. Is there some intention behind that behavior or is it just the
> shortest way towards conformance?
Two reasons:
1) The mangled name is shorter, so the RTTI overhead is lower.
2) The mangled name is unique.
Jason