Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-04-15 19:46:55

At 10:51 AM 4/14/2001, Greg Chicares wrote:

>status/cs-win32.html says gcc fails the test in libs/timer/timer_test.cpp
>With these two patches, it works[1] with gcc-2.95.2-1[2]:
>Patch one:
>- #include <limits>
>+ #include <boost/pending/limits.hpp>
>I believe John Maddock already did this on 2001-04-01
>and replaced boost/pending/limits.hpp with boost/limits.hpp.

Yes, thanks.

>Patch two:
> #include <iostream>
>+ #if defined(__GNUC__) && __GNUC__ == 2 && __GNUC_MINOR__ <= 95
>+ namespace std { class ios_base : public ios{}; }
>+ #endif // defined(__GNUC__) && __GNUC__ == 2 && __GNUC_MINOR__ <= 95
> namespace boost {
>Is this preferable to the workaround
> std::istream::fmtflags f_; // old GNU c++ lib has no ios_base
>in random.hpp?
>Either of these hacks could be put in a header /boost/iostream.hpp,
>which could then be used in place of <iostream> throughout boost;
>but I imagine that's objectionable for a single-compiler workaround.
>Another option is to use either hack wherever ios_base is used:
> progress.hpp
> rational.hpp [already uses std::istream::fmtflags]
> libs/regex/src/cpp_regex_traits.cpp
>I think that's the best way.

See Jens' reply.

>Leaving rational.hpp as it is and ignoring the other two files
>that use ios_base is another option that doesn't seem good.
>[1] I get
> t1 elapsed: 1.05
> t2 elapsed: 1.05
> t1 and t2 should report the same times (very approximately 2 seconds).
>Is 1.05 close enough to 2? With borland C++ 5.5 I get
> t1 elapsed: 1.339
> t2 elapsed: 1.339

Should be OK. To tell the truth, I never trust any timer until I've run it
many times against a stopwatch.

>[2] The official gcc / win32 test platform seems to be cygwin;
>I used the mingw32 port ( Is there any interest
>in reporting mingw32 test results as well in status/cs-win32.html?

What happens when gcc 3.0 ships? Will we still have these variants?



Boost list run by bdawes at, gregod at, cpdaniel at, john at