
20 Mar
2004
20 Mar
'04
6:51 p.m.
Reece Dunn wrote:
Gennaro Prota wrote:
My goal was to choose short names, as otherwise preprocessing lines easily become enormous (if nothing else, it's a boost guideline to not exceed 80 characters). Note that even things like:
#if BOOST_MSVC >= 1200
are usually rewritten as
#if defined(BOOST_MSVC) && BOOST_MSVC >= 1200
just because gcc warns about the first form when using -Wundef. And something like
#if defined(BOOST_GCC_CXX_VERSION) && BOOST_GCC_CXX_VERSION >= 295
is already 66 characters.
Isn't there a BOOST_WORKAROUND macro for this? e.g. #if BOOST_WORKAROUND( BOOST_MSVC, >= 1200 ) #if BOOST_WORKAROUND( BOOST_GCC_CXX_VERSION, >= 295 )
There is, but you still need to prefix it with defined() to be -Wundef -clean.