Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2002-08-20 09:44:07

On Tue, 20 Aug 2002 11:46:29 +0100, "John Maddock"
<jm_at_[hidden]> wrote:

>> P.S.: As to g++ versions, does someone know if this is correct?
>> #if defined (__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ <= 95
>> #endif
>> Or, maybe, just this?
>> #if __GNUC__ < 3
>> #endif
>No, both of those fail if the user is using STLport.

Yes. In practice I just wanted to know which versions of g++ have the
new iostreams (after that, of course I would have added the test for
STLport). By looking at boost/config/stdlib/sgi.hpp I've seen, for
instance, the following code

#if defined(__GNUC__) && (__GNUC__ < 3) && \
     ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) && \
     !defined(__STL_USE_NEW_IOSTREAMS) || \
   // Note that we only set this for GNU C++ prior to 2.95 since the
   // latest patches for that release do contain a minimal <sstream>
   // If you are running a 2.95 release prior to 2.95.3 then this will
   // setting, but there is no way to detect that automatically (other
   // than by running the configure script).
   // Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't
   // have <sstream>.

from which the situation seems quite complex (thanks to the comments I
understand the code anyhow, that's not my point)

> Although if we put it
>in boost/config/stdlib/sgi.hpp then it may work. Is this a particular macro
>you need (I take it that it is?).

Yes. dynamic_bitset.hpp has the following erroneous test:

#ifdef __GNUC__

and I would have liked to correct it. Anyhow, please, don't take it
seriously: Jeremy doesn't even reply to mails so I think he is no more
interested in my changes. (BTW, besides optimizations, there are
several errors in the code that would need a fix).


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