On Sun, Apr 28, 2002 at 04:21:01PM +0300, Sha...@in... wrote:
> Now, the CppUnit configure script assumes that if the compiler
> supports namespaces, then the standard library is in namespace
> std.
In fact, there are a couple of problems that are perhaps being conflated.
The configure script does check for namespace support. Currently,
however, the only effect of namespace support is that some of the
other configure tests add "using namespace std;" to the test program.
So you may end up with the wrong result for the following preprocessor
symbols
HAVE_SSTREAM
HAVE_CLASS_STRSTREAM
FUNC_STRING_COMPARE_STRING_FIRST
Check in include/cppunit/config-auto.h, and edit by hand, if necessary.
The second -- much larger -- problem is that CppUnit assumes
unconditionally that the standard library is in namespace std.
[Yes, the result of the namespace test is ignored :-(]
> I've been thinking that I should solve this by adding a header
> file defining namespace std, and including in it (with "using"
> declarations) every name the compiler will complain about.
>
> Are there better options?
I don't know. The suggestion to #define std to empty seems like
less work, if it indeed fixes all the problems.
It would be nice to have this detected and handled automatically, if
possible. I suggest you open a bug report on this (be sure to include
the URL of this thread, for reference).
> Are there solutions to this problem in the more recent versions of
> CppUnit? 1.6.2 works fine for me in the other environments, and
> upgrading on four platforms is a cost I would much rather avoid.
Nothing in this area has changed in recent versions.
-S
--
by Rocket to the Moon,
by Airplane to the Rocket,
by Taxi to the Airport,
by Frontdoor to the Taxi,
by throwing back the blanket and laying down the legs ...
- They Might Be Giants
|