
1 Sep
2011
1 Sep
'11
2:54 a.m.
On Wed, 31 Aug 2011 16:09:30 -0400, Edward Diener wrote:
If I can correct the curryable.h code I believe the use of
#elif BOOST_PP_ITERATION_FLAGS() == 1
and
#elif BOOST_PP_ITERATION_FLAGS() == 2
is wrong because BOOST_PP_ITERATION_FLAGS() is always evaluated in these lines even when BOOST_PP_IS_ITERATING is not defined. I think instead you must specify:
It isn't "evaluated" so much as macro-expanded and parsed.
#else #if BOOST_PP_ITERATION_FLAGS() == 1 .... #else #if BOOST_PP_ITERATION_FLAGS() == 2 .... #endif #endif
It should be sufficient to do this: #if !BOOST_PP_IS_ITERATING #else #if BOOST_PP_ITERATION_FLAGS() == 1 ... #elif BOOST_PP_ITERATION_FLAGS() == 2 ... #endif #endif -Paul