This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: type_info::name question
- To: <oliva at dcc dot unicamp dot br>
- Subject: Re: type_info::name question
- From: kunert at physik dot tu-dresden dot de
- Date: Mon, 21 Sep 98 12:10:13 GMT
- Cc: <egcs at cygnus dot com>
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