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
>> #define HAS_OLD_IOSTREAMS
>> #endif
>>
>> Or, maybe, just this?
>>
>> #if __GNUC__ < 3
>> #define HAS_OLD_IOSTREAMS
>> #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) || \
   defined(__APPLE_CC__)
   // 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
need
   // 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>.
# define BOOST_NO_STRINGSTREAM
#endif

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__
#define BOOST_OLD_IOSTREAMS
#endif

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).

Genny.


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