
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Tobias Schwinger
BOOST_PP_IF(1, BOOST_PP_ENUM_PARAMS(3, p), blah)
Note: - BOOST_PP_IF does not get disabled
IF getting disabled doesn't matter here. The entire ENUM_PARAMS invocation occurs on entry to IF--where IF is not get disabled.
- lazy invocation => no repetition in the "else-case".
This one is closer to the actual problem. ENUM_PARAMS is an intermediate if the repetition count is higher than one. An "intermediate" is a single argument that expands to multiple arguments--which creates pathological input that IF cannot deal with: #define IF(cond, t, f) IIF(BOOL(cond), t, f) When IF is invoked, the argument for 't' (in particular) gets expanded prior to substitution of 't' in the replacement list of IF (long before IIF is invoked). This results in: IIF(BOOL(1), p0, p1, p2, blah) Which is clearly too many arguments to IIF. Regards, Paul Mensonides