
Angus Leeming <angus.leeming@btopenworld.com> writes:
David Abrahams wrote:
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.
Right. Agree 100%.
The problem is that, at the moment, no such macro is always defined.
That should be done in boost/config/suffix.hpp
How about macros like this in workaround.hpp:
====================================================== #if defined(__BORLANDC__) # define BOOST_WORKAROUND_BORLANDC(X) BOOST_WORKAROUND(__BORLANDC__, X) #else # define BOOST_WORKAROUND_BORLANDC(X) 0 #endif
No thanks. We need BOOST_BORLANDC, etc. There are times when those values will be useful without the BOOST_WORKAROUND macro.
Sorting through the sources, it appears that there are BOOST_WORKAROUNDS used for the following macros (extraction script also below). Would you like me to proceed on a bitwise basis, defining macros as above and then applying it to the code base, or can you describe a better way (for me) to proceed?
It isn't just the uses of BOOST_WORKAROUND that will benefit. I'm sure there are plenty of legacy tests that should be converted. -- Dave Abrahams Boost Consulting www.boost-consulting.com