|
Boost : |
From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2002-12-11 18:20:30
On Wed, 11 Dec 2002 14:38:03 -0800, "Paul Mensonides"
<pmenso57_at_[hidden]> wrote:
>It easy to cause it to error though:
>
>#define BOOST_WORKAROUND(symbol, test) (((symbol) != 0) && 1 % ((symbol)
>test ? 1 : 0))
Ah, yes, of course! I removed division-by-zero from my mental bag of
give-me-an-error-please tools, when I discovered it just emits a
warning (removable, what's more) with Borland C++ :-)
>[...]
>You could do something like this:
>
>#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530)
>
>#if defined(BOOST_DEVELOPER_WARNINGS) && __SUNPRO_CC > 0x530
>#pragma boost developer warning: compiler version exceeded
>#endif
>
>// ...
>
>#endif
Well, that's obvious. Libraries that need at least one workaround for
the latest version of a given compiler could have a separate include
file where they do a suitable test. Since it would be targeted to a
specific compiler whatever way to emit a warning or an informational
message with that compiler would be acceptable
// dynamic_bitset_config.hpp
// (probably this file would have a standard name/subdirectory)
//
#if ( __BORLANDC__ > 0x570) // last checked version
#pragma message Compiler version exceeded
#endif
I was just saying: "it would be nice" IF we could have this feature
somehow built-in in the macro used for the workarounds themselves.
Genny.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk