Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-04-12 08:16:38


"John Maddock" <john_at_[hidden]> wrote in message
news:015c01c53f47$af97b470$b3560252_at_fuji...
>> #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 ?

As above suggest it would produce 295

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

Look reasonable

> 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?

Do you want me to check this in?

> John.

Gennadiy

P.S. While we are at it shouldn't we make sure we have single recognizable
macro for each compiler we support (using above convention or the natural
one supplied by compiler):

BOOST_BORLAND
BOOST_CAMEAU
...
BOOST_VACPP
BOOST_MSVC


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