This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Standard header format.


----- Original Message ----- 
From: "Steven T. Hatton" <hattons@globalsymmetry.com>
To: <libstdc++@gcc.gnu.org>
Sent: Wednesday, June 09, 2004 7:08 PM
Subject: Re: Standard header format.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 09 June 2004 11:26, Bo Persson wrote:
> ----- Original Message -----
> From: "Steven T. Hatton" <hattons@globalsymmetry.com>
> To: <libstdc++@gcc.gnu.org>
> Sent: Wednesday, June 09, 2004 2:40 AM
> Subject: Re: Standard header format.
>
> > > I have insulted no one.  I cannot say the same for others who have
> > > participated in this discussion.
> >
> > You argue with the library maintainers and the people who actually
wrote
> > the text of the relevant chapters of the standard document that they
don't
> > understand how it should have been done. When they try to to explain
their
> > point of view, you declare that they are wrong - all of them.
> >
> > You don't see why they could feel a bit insulted?

> If I disagree with them, I say so.  If they find that insulting, that
is their
> failing, not mine.

You originally complained that the header files used by gcc didn't look
like the standard headers outlined in the standard document.

The library maintainers replied that it wasn't their intention to have
it that way. Members of the C++ committee, including those who actually
wrote the text, confirmed that it wasn't their intention either.

Others have explained that even if you tried, it is not possible to have
exactly the same number of header files as there are standard header,
because there are technicalities like circular references. Some headers
will have to include others, and there are no order that will actually
compile! One way to solve this is to divide the declarations into
sub-headers, using additional files.

You also used std::char_traits from the standard document as an example
of how a header should look like. A specific problem with that one (as
mentioned in the standard) is that char_traits<char> uses the type
streampos, which is declared in <stdfwd> as

typedef fpos<char_traits<char>::state_type>   streampos;

meaning that streampos needs char_traits<char>, which needs streampos to
be declared first.

The <string> header uses exceptions from <stdexcept> that has
std::string parameters in their constructors. Which header should
include the other?

The <string> header also uses <istream> and <ostream> which have
std::char_traits as a default parameter for most of their types.
char_traits is, of course, supposed to be declared in <string>. So they
have to include each other?



And you still disagree!


> There is a discussion on comp.lang.c++ about this topic presented in
the
> abstract which expresses my current thinking on this matter. You would
do
> well to read it if you care to know what my opinions and ideas really
are.

I have read that and am just as amazed as I am here.



Bo Persson



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