Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2005-04-12 05:02:59


> #if __GNUC__ < 3
> # define BOOST_GCC BOOST_JOIN(__GNUC__,__GNUC_MINOR__)
> #else
> # define BOOST_GCC BOOST_JOIN(
> BOOST_JOIN(__GNUC__,__GNUC_MINOR__),__GNUC_PATCHLEVEL__)
> #endif
>
> This should work until second or third component is < 10.

What about gcc-2.95 ?

> Also appropriate print added into confg_info.
>
> Anybody mind?

I think I would have preferred a more consistent numbering system - a bit
like BOOST_VERSION maybe:

#define BOOST_GCC (__GNUC__*10000 + __GNUC_MINOR__ * 100 +
__GNUC_PATCHLEVEL__)

Of course even that can in theory go wrong, but it does make checks easier
to read (because of greater consistency between gcc 2 and 3):

#if BOOST_WORKAROUND(BOOST_GCC, <= 29500)
#else BOOST_WORKAROUND(BOOST_GCC <= 30400)
// etc....

Any other thoughts?

John.


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