Boost logo

Boost :

From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2001-04-15 03:50:17


Greg Chicares wrote:

> Patch two:
>
> boost/progress.hpp
> #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 {

This is not good if it's repeated in several header files and
thus multiple definitions of ios_base are encountered.

> Is this preferable to the workaround
> std::istream::fmtflags f_; // old GNU c++ lib has no ios_base
> in random.hpp?

This work-around is entirely conformant with both old and new
iostreams. Therefore, I believe this workaround (albeit a bit
strange to the eye) is acceptable, and superior to messing around
with defining ios_base. It's an implementation-level
workaround anyway, so interfaces are not affected.

Jens Maurer


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk