
29 Jan
2006
29 Jan
'06
4:28 p.m.
Paul Mensonides wrote:
BOOST_PP_IF( n, BOOST_PP_TUPLE_EAT, BOOST_PP_TUPLE_REM )(1)( EXPENSIVE_MACRO_INVOCATION() )
...where EXPENSIVE_MACRO_INVOCATION() is only invoked if 'n' is 0.
Guessing from the overtone of your comment it would be better to say BOOST_PP_IF(n, BOOST_PP_TUPLE_EAT(0), EXPENSIVE_MACRO_INVOCATION)() to be on the safe side with less compliant preprocessors. Correct? --- #define MACRO(x) x MACRO(BOOST_PP_EMPTY()) BTW. is this special case safe (theoretically and practically, that is)? Regards, Tobias