
Gennaro Prota <gennaro_prota@yahoo.com> writes:
On Sun, 16 Jul 2006 21:02:30 -0400, David Abrahams <dave@boost-consulting.com> wrote:
These cases are comparitively rare
#if BOOST_CXX_FOO >= BOOST_VERSION_NUMBER(2,0,0) \ && BOOST_CXX_FOO < BOOST_VERSION_NUMBER(3,0,0)
or 'if major=3 and minor>2', so I'd rather need BOOST_CXX_FOO_MAJOR etc.
#if BOOST_CXX_FOO >= BOOST_VERSION_NUMBER(3,2,0) \ && BOOST_CXX_FOO < BOOST_VERSION_NUMBER(4,0,0)
We can do better than that, stay tuned! :) The last piece of the puzzle, now, is choosing a migration plan. BOOST_WORKAROUND will have a different interface and I don't think it is feasible to replace all invocations in one sweep (though I haven't actually counted them) and even if it is the risk of destabilization is high. What about momentarily use BOOST_WORKAROUND_2 as name for the new macro and gradually do the transition? At the end, we would have just to change BOOST_WORKAROUND_2 to BOOST_WORKAROUND everywhere. Not that I like this too much but this is the only idea that I have.
You might be able to do something like BOOST_WORKAROUND(CXX_GCC, VERSION <= (3)(4)(2)) as a transition step, and then when you're done, just make "VERSION" optional. That would also allow checking just major, or just major+minor versions: BOOST_WORKAROUND(CXX_GCC, VERSION <= (3)(4)) -- Dave Abrahams Boost Consulting www.boost-consulting.com