Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2006-07-08 14:58:53

Hi guys,

I've just committed a prefix file with the new macro names that will
be used for compiler identification:


This is basically your last chance to point out better names for them;
I've marked with a comment the ones which diverge significantly from
the built-in identification macro names (e.g.: BOOST_CXX_CW, whereas
the built-macro is named __MWERKS__). The file is in /boost/config:


One other issue:

suppose a compiler defines M=0xMMmmpp to indicate version (a
common case). Let's take 0x030411 as an example. Now, since we want
the user to be able to write:

 #if BOOST_CXX_FOO == BOOST_VERSION_NUMBER(3, 4, 11) // (a)

we have to define BOOST_CXX_FOO in a way that "transforms the single
parts" of M as if they were expressed in decimal. If we simply take M
& 0xFF as sub-minor version number then it actually results in 17 (11
base sixteen) and (a) will never be true.

So, is it my understanding correct that what we want to do is some
machinery like this?

 #define SUBMINOR \
   ( (M & 0xF) + 10* ((M & 0xF0)>>4) )
 #define MINOR \
   ( ((M & 0x0F00) >> 8) + (10* ((M & 0xF000)>> 12)) )
 #define MAJOR \
  ( ((M & 0x0F0000) >> 16) + (10 * (( M &0xF00000) >> 20) ))

 #define BOOST_CXX_FOO \

(note the various multiplications by 10, to "interpret" everything as

[ Gennaro Prota, C++ developer for hire ]
[    resume:  available on request      ]

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