namespace issues with old C headers

Gabriel Dos Reis gdr@integrable-solutions.net
Sat Apr 12 17:43:00 GMT 2003


David Schultz <das@FreeBSD.ORG> writes:

| On Sat, Apr 12, 2003, Gabriel Dos Reis wrote:
| > David Schultz <das@FreeBSD.ORG> writes:
| > | (B)	Ameliorate the problem by getting rid of promiscuous
| > | 	includes of <cmath> in other headers.
| > 
| > This is unlrealistic.
| 
| Most libc implementors have done this for some time, so I'm not

Maybe, but you need to keep in mind that this is *C++* library
implementation, not libc.

| sure why it is problematic.  In C, it is actually required that
| standard headers not pollute the namespace with symbols from other
| headers, lest standard C programs fail to compile.  Perhaps C++
| differs in this regard, but that doesn't explain why this idea is
| ``unrealistic.''

C++ definitely has a different requirement:  It allows a standard
header (not a C-iniherited one) to include another standard header.
And in effect, if a standard function implementation needs to use
(reasonably) another stanadrd function, I don't see why it should not
be permitted to include the appropriate header. 

| In any case, you have shot down all of my proposed solutions,

The intent wasn't to shut down all of your proposed solutions.
I'm more interested in a "real" solution and none of what you proposed
seems to address the real problem.  I see Loren is working a
patch that might give real solution.


-- Gaby



More information about the Libstdc++ mailing list