This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Standard header format.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday 05 June 2004 13:47, Gabriel Dos Reis wrote:
> "Steven T. Hatton" <hattons@globalsymmetry.com> writes:
>
> [...]
>
> | In TC++PL(SE) Stroustrup suggests I look at the standard headers for my
> | C++ implementation to see the interface for the components of the
> | Standard Library.
>
> Can you present full quote and context?
On such instance is here:
17 Standard Containers
17.1 Standard Containers
17.1.1 Operations Summary
"This section lists the common and almost common members of the standard
containers. Form more details, read your standard headers (<vector>, <list>,
<map>, etc., sect. 16.1.2)."
The rest of the section is a series of tables describing different groups of
members of the container templates.
>
> | Is there an easy way to extract the interface declarations for the
> | Standard Library from the GCC include hierarchy? If not, I propose that
> | either that mechanism be created, or some means of providing a direct
> | representation of the standard headers be part of the GCC distribution.
>
> I do not see what problems that would solve. Clearly, the C++
> standard does not dictate that the standard headers correspond to
> actual files; and even if they do, the C++ standard does not dictate
> that they contain anything that is standard C++. At some point, I
> would like to see more collaraboration between the compiler and the
> library, and clearly that means more magic things going on.
I was not suggesting the Standard required this. I was merely suggesting
there are likely significant advantages in having access to a clear
representation of the interface provided by the Standard Library.
I am certain one of the most important roles Stroustrup believes header files
should play is that of providing an interface to the user (or implementer)
for the items declared in the header. That means in a human readable form. I
can provide quotes on this if it will help. Chapter 9 is one place were he
expresses such ideas.
This is a concept held rather passionately by may participants of the
comp.lang.c++. If you doubt this, try posting under an alias challenging the
notion.
- --
Regards,
Steven
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQFAwhU8wX61+IL0QsMRAtnSAJ4z/NXzSf7DOpa+XUWJ4wNOLkDZogCglf6T
vlQ/h01tG3bjtlGJ5ytrfAk=
=gEZF
-----END PGP SIGNATURE-----