namespace issues with old C headers

Gabriel Dos Reis gdr@integrable-solutions.net
Tue Apr 15 08:19:00 GMT 2003


David Schultz <das@freebsd.org> writes:

[...]

| Note that things work fine if <math.h> is included without
| <cmath>, but if <cmath> is ever included directly or indirectly,

Here is what the C++ standard say (D.5 which I already pointed you at):

  Each C header, whose name has the form name.h, behaves as if each name
  placed in the Standard library namespace by the corresponding cname
  header is also placed within the namespace scope of the name-space std
  and is followed by an explicit using-declaration (7.3.3).

Bringing C99 stuff into C++1998 or C++2003 is sort of extension and we
need to do it in a rational way compatible with the existing. To have
an idea of how those features might get their way into the next major
revision of C++, see: 

   http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1444.html#1
   http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1354.txt

-- Gaby



More information about the Libstdc++ mailing list