Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2002-12-11 17:13:03


On Wed, 11 Dec 2002 15:36:39 -0500, David Abrahams
<dave_at_[hidden]> wrote:

>How?
>
>What we want is something that can be used like:
>
> #define BOOST_WORKAROUND(symbol,test) (((symbol) != 0) && ((symbol) test))

I see the parentheses here becoming more and more :-) Are you thinking
to some usage where the first argument of the macro invocation is not
a single pp-token?

>
> #if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530)
> // workaround code
> #endif
>
>How can we say
>
> #if BOOST_WORKAROUND(__SUNPRO_CC, /*something involving 0x530 */)
>
>and have it enter the #if and warn when __SUNPRO_CC > 0x530 ?

Well, I will put off thinking about a portable way to generate an
error (I'm under the impression it is possible but I want to
experiment a bit), but if Paul knows a portable way to emit a
*warning* upon macro invocation, well, I'm struck dumb with
astonishment!

Genny.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk