|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-01-24 11:53:15
Aleksey Gurtovoy <agurtovoy_at_[hidden]> writes:
> What would be an equivalent of the following #fief, if I want to re-writte
> it using our new BOOST_WORKAROUND macro?
>
> // last checked with 0x561
> #if defined(__BORLANDC__) && __BORLANDC__ >= 0x561 &&
> !defined(BOOST_STRICT_CONFIG)
>
> Here, "0x561" is the first version requiring the workaround and at the same
> time the last checked version (so, ideally, I would like to be able to check
> if it's outdated).
Here are three ways to spell it:
#if BOOST_WORKAROUND(__BORLANDC__, >= 0x561) \
&& BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561))
#if BOOST_WORKAROUND(
__BORLANDC__, BOOST_TESTED_AT(0x561) && __BORLANDC__ >= 0x561)
#if __BORLANDC__ >= 0x561 \
&& BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561))
I kinda like the last one.
-- David Abrahams dave_at_[hidden] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk