
Daniel Walker wrote:
On 5/9/07, Daniel Walker <daniel.j.walker@gmail.com> wrote:
On 5/9/07, Peter Dimov <pdimov@mmltd.net> wrote:
Other comments:
BOOST_WORKAROUND(BOOST_GCC, <= 0x0400) is always true when the compiler isn't GCC since BOOST_GCC is not defined.
Oops! Good catch. Thanks!
Double oops. I take that back. I just remembered I actually tested this last week on msvc, and it worked. If the first argument to BOOST_WORKAROUND is undefined the condition won't be met. There's documentation in boost/detail/workaround.hpp.
Cool, I'd forgotten about this. :-) There's an additional reason to check with defined() first, though: using an undefined symbol with BOOST_WORKAROUND generates a warning with -Wundef, and there are people who use this flag. This doesn't really apply here since -Wundef is a GCC option and the symbol will be defined, but I still consider it a good practice to qualify any use of BOOST_WORKAROUND with the appropriate defined(). Not triggering -Wundef is another feature that we don't test.