Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2002-12-18 17:57:27


--- Gennaro Prota <gennaro_prota_at_[hidden]> wrote:
 
> For Borland [...]
>
> // There seems to be no way to make Borland honor 5p5
> // when evaluating the controlling expression of a #if,
> // but it supports sizeof expressions therein.
> //
> #define BOOST_WORKAROUND(symbol, test) \
> ((symbol != 0) && \
> (1 != sizeof(char[((symbol) test) == -1 ? 0 : 1 + ((symbol) test)])))
>

Or just

#define BOOST_WORKAROUND(symbol, test) \
            ((symbol != 0) && (1 != sizeof(char[1 + ((symbol) test)]) ))

of course :-)

Genny.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


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