
26 Aug
2007
26 Aug
'07
2:44 p.m.
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