Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2003-11-03 03:17:46


On 11/2/03 2:10 PM, "Douglas Gregor" <gregod_at_[hidden]> wrote:

> The Boost.Test library is failing to build on GCC 2.95.3, causing a huge
> number of regressions on that compiler. The culprit? The GCC 2.95.3 standard
> library doesn't define std::ios_base; it calls the same thing std::ios. I can
> see two solutions:
>
> 1) Add a macro BOOST_IOS_BASE that is defined to ios_base unless we are using
> GCC 2.95.3's library, in which case we define it to ios.
>
> 2) When we detect the base case, add this:
> namespace std {
> typedef ios ios_base;
> }
>
> I'm inclined to go with #1. If there are no objections, I'll go ahead and make
> this change, and modify all libraries using ios_base to use BOOST_IOS_BASE
> instead.

The real problem is that GCC 2.x uses a pre-Standard I/O library; the
problem you describe is only one symptom of that. The I/O stuff I write for
Boost is incompatible with pre-Standard I/O for more reasons (i.e.
templates) than the ios_base issue. Code like mine will be uglified with
the macro with no benefit. Maybe option #2 would work better.

(There is a current std::ios. It's a typedef of std::basic_ios<char>.
Also, std::ios back then was like a combination of the current ios_base and
basic_ios.)

Daryle


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