Boost logo

Boost :

From: Vesa Karvonen (vesa_karvonen_at_[hidden])
Date: 2002-04-08 10:56:36


David Abrahams:
>The docs for BOOST_PP_BOOL(X) say:
>
> Expands to 0 if X == 0 and 1 if X != 0.
>
>So I expected:
>
> BOOST_PP_BOOL(const volatile) == 1
>
>However, that's not the case. I think this problem is endemic in the
>docs. How do I know which macros expect numeric arguments?

Yes, I should probably describe the parameter requirements more explicitly.
The reason why it is not explicitly stated, is because all logical,
comparison and arithmetic operations expect decimal integer literals. This
is intuitive, because decomposing arbitrary token[ sequence]s using the
preprocessor is impossible.

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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