Boost logo

Boost :

From: Robert Allan Schwartz (notbob_at_[hidden])
Date: 2003-03-03 08:17:58

----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: "Boost mailing list" <boost_at_[hidden]>
Sent: Monday, March 03, 2003 7:59 AM
Subject: Re: [boost] Re: How to convert a template parameter into a string

> Robert Allan Schwartz wrote:
> >>> I believe a "standardized" (within Boost), portable, and *readable*
> >>> text representation of T makes my proposal better than typeid().
> >>
> >> I think if readability is the main criterion we'd do much better to
> >> invest in decoding the typeids generated by GCC. I believe there's
> >> even a library that comes with it that does that job.
> >
> > Why should millions of programmers have to make that "invest"ment?
> >
> > Wouldn't it be better if gcc simply generated better type names?
> Sure, if there existed an unambiguous definition of "better type name".

Maybe there's no "perfect" definition of "better", but let's see how far we
can go with a "good-enough" definition.

T is P4base
T is 4base
T is PC4base
T is 4base

when compiled by g++ and executed in cygwin, is "not good enough". Anyone

T is class base *
T is class base
T is class base const *
T is class base

when compiled and executed by MSVC 6.0, is "good enough", but it could be
"better" if it eliminated the redundant "class" specifier.

We could argue about the difference between "base const *" and "base const*"
(i.e. whitespace).
We could argue about the difference between "base const" and "const base".

But I still think we should fix the gap in the Standard, and choose
standard, portable, type names.

If we don't do that, then at least my proposal lets each developer choose
what THEY want for type names.


Boost list run by bdawes at, gregod at, cpdaniel at, john at