Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-12-06 14:16:39

I've just checked in boost/detail/workaround.hpp, which defines the

This macro can and should be used in place of explicit tests for
particular compiler/library/platform versions.

I've also gone through and replaced all the explicit tests in
boost/iterator_adaptors.hpp with uses of BOOST_WORKAROUND, as a

One thing I really noticed, which I've been meaning to mention here
for a long time: we used to have an informal policy that
non-workaround code should appear first, e.g.:

# if !broken-compiler
   // normal code
   // workaround code

That approach never scaled well (what if you have multiple workarounds
for different compilers?) and it works even less-well now. you have to

# if !BOOST_WORKAROUND(version, <= old_version)

But the BOOST_WORKAROUND macro is much clearer when it announces the
workaround code, not the regular stuff. So I suggest that we give in
to reality and put the workaround code at the bottom of the chain of
#if directives.


                       David Abrahams
   dave_at_[hidden] *
Boost support, enhancements, training, and commercial distribution

Boost list run by bdawes at, gregod at, cpdaniel at, john at