Standard header format.

Steven T. Hatton hattons@globalsymmetry.com
Wed Jun 9 20:22:00 GMT 2004


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

On Wednesday 09 June 2004 14:51, Bo Persson wrote:
> ----- Original Message -----
> From: "Steven T. Hatton" <hattons@globalsymmetry.com>

> > 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.

I observed.  I did not "complain".

> 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.

Since you are speaking in generalities, I am not sure exactly what you mean.  
Please provide the relevant references to the actual discussion.

> 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.

These are my words, written last night, from a discussion about this topic 
elsewhere:

"Second, the implementors of one implementation of the Standard Library(STL is 
an informal subset, I believe) have told me there are places where the
standard does not completely specify the interface, and some other problems
involving circular dependencies.  I also believe there may be some places
where the standard is very specific about things being implementation
defined." 

> 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?

No one gave anything like that kind of an elaboration.  So I was not able to 
address it. From what you wrote, it appears you are not drawing a distinction 
between interface and implementation.

> And you still disagree!

Disagree with what?  




- -- 
Regards,
Steven
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAx3HqwX61+IL0QsMRAsiiAKDDNUfUjna4LvrFyVIiypl6LMtAuQCeN1Wp
QaA0JzPwJOB+kKH2IhjplL0=
=ZOBk
-----END PGP SIGNATURE-----



More information about the Libstdc++ mailing list