
Tobias Schwinger <tschwinger@neoscientists.org> writes:
David Abrahams wrote:
Tobias Schwinger <tschwinger@neoscientists.org> writes:
How about these?
#define BOOST_COMPILER_WITH_VERSION(compiler,version) \ (compiler == version)
#define BOOST_COMPILER_ABOVE_VERSION(compiler,version) \ (compiler > version)
<snip>
No. That's what BOOST_WORKAROUND does, and BOOST_WORKAROUND does it better. Please read http://www.boost-consulting.com/boost/boost/detail/workaround.hpp
Know it already. Personally I'm not too much into the stuff I posted either. But the code shows a reasonable set of comparison operations if we encode them in the macro name.
Why should we do that when we can just write the comparison operator with BOOST_WORKAROUND?
We might as well (which seems even better to me) take the comparison operator as part of the macro argument like BOOST_WORKAROUND does:
#define BOOST_MSVC_VERSION(test) (defined(BOOST_MSVC) && (BOOST_MSVC test))
That's not legal code. What are you trying to accomplish that BOOST_WORKAROUND doesn't already provide?
And while we're at it -- I'ld like a variant of BOOST_TESTED_AT, "BOOST_TESTED" that also takes the comparison operator:
BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED(> 1200))
And what do you think that is supposed to do? -- Dave Abrahams Boost Consulting www.boost-consulting.com