__STL_NO_NAMESPACES is wrong
Paul J. Lucas
pauljlucas@mac.com
Tue Apr 17 08:24:00 GMT 2001
In stl_config.h, there is a section that defines a bunch of
stuff for the g++ compiler (#ifdef __GNUC__). For recent
versions, it incorrectly (in my opinion) defines __STL_NO_NAMESPACES
(this despite the fact that it also defines __STL_HAS_NAMESPACES).
The __STL_NO_NAMESPACES flag is supposed to be user-defined
only, yet it's defined by the header and there is no way for the
user to undefine it (short of editing the header file. (It's
also defined incorrectly for _MSC_VER).
One consequence of this is that std::iterator doesn't get
defined. I saw that this has been a known problem since at
least late 1999 (from another mailing list's archives).
Shouldn't this be fixed? Simply removing all definitions of
__STL_NO_NAMESPACES does it.
- Paul
More information about the Libstdc++
mailing list