Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2007-08-26 10:44:44


on Sat Aug 25 2007, "John Maddock" <john-AT-johnmaddock.co.uk> wrote:

> What if we reverse the logic a little:
>
> # define BOOST_WORKAROUND(symbol, test) \
> (0 == (BOOST_WORKAROUND_GUARD_ ## symbol) && \
> (symbol != 0) && (1 % (( (symbol test) ) + 1)))
>
> Which (I hope!) has no change to current behaviour if
> BOOST_WORKAROUND_GUARD_ ## symbol is not defined.
>
> Then for common pp-symbols we add:
>
> #define BOOST_WORKAROUND_GUARD_BOOST_MSVC !defined(BOOST_MSVC)
>
> And hopefully the warnings get suppressed: at least in the common cases.

Looks good to me. In which non-error cases would it fail to suppress
the warning?

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
The Astoria Seminar ==> http://www.astoriaseminar.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk