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]

Re: type_info::name question


Alexandre Oliva wrote:
> 
> Thomas Kunert <kunert@physik.tu-dresden.de> writes:
> 
> > IMHO, type_info::name isn't useful at all if it returns some cryptic
> > string.
> 
> type_info::name *isn't* useful at all, as defined in the standard.  

Only if one clings to the paper as you do. 
The function is called `name', not `some_arbitrary_string'. IMO, that is
description enough. 

``Implementation defined'' doesn't mean ``as unuseful as possible to
prevent portability problems'' but ``make the best of it, everybody
should know about portability''. And if the function does what it's name
suggests -- giving the name of the type in some readable language -- it
*is* useful.

> If you really want a readable representation,
> I've already explained that it's just a matter of running c++filt or
> embedding it into your application.

Of course I can do that, in fact I have done this a long time ago, to
port some perfectly working code to egcs, but I hate rewriting functions
from the standard library only because of some weird chosen
implementation defined values.

Regards, 
Thomas



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