Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-10-14 09:23:00

Angus Leeming <angus.leeming_at_[hidden]> writes:

> Compiling the attached code with g++ 3.4.4 as
> g++ -Wundef -Iboost/cvs -o trial trial.cpp
> produces a heap of warnings
> warning: "__BORLANDC__" is not defined
> warning: "_MSC_FULL_VER" is not defined
> warning: "__MWERKS__" is not defined
> The warnings are produced by code like:
> and are, of course, silenced by:
> #if defined(__MWERKS__) && \
> Grepping around the boost sources, I see that my 'fix' has been applied
> about 70 times already in the 1260 uses of BOOST_WORKAROUND. Assuming that
> the lack of consistency reflects only the size of the task, I've made a
> patch applying the fix to Boost.Random. Chipping away at the block...

I object to adding all these specific silencing tests. IIRC we were
going to handle this by creating boost macros for each compiler,
similar to BOOST_MSVC, that were always #defined (possibly to 0), and
using those in the BOOST_WORKAROUND tests. Otherwise, we will end up
uglifying a lot of code, where BOOST_WORKAROUND is supposed to make
the code much simpler and more readable.

Dave Abrahams
Boost Consulting

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