
12 Jul
2005
12 Jul
'05
8:33 p.m.
Jonathan Turkanis wrote:
The ability to accommodate these unlikely scenarios has to be balanced against usability. If a test for GCC with major version < 3 has to use "3000000," chances are good that a test will be misspelled and a needed workaround will not be applied.
It is possible to put an expression to calculate the 3000000 in this case into a macro: #define BOOST_VERSION(major,minor,patchlvl) \ (major * 1000000 + minor * 1000 + patchlvl) #define BOOST_GCC \ BOOST_GCC_VERSION(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__) Example: #if BOOST_WORKAROUND(BOOST_GCC,< BOOST_VERSION(3,2,3)) // ... #endif Regards, Tobias