24 Aug
2006
24 Aug
'06
6:38 a.m.
Hello, I simply want to increment a macro, like that: #define VARIABLE 7 FunctionA( VARIABLE ); // VARIABLE expands to 7 #define VARIABLE BOOST_PP_INC(VARIABLE) FunctionB( VARIABLE ); // VARIABLE expands to 8 #define VARIABLE BOOST_PP_INC(VARIABLE) FunctionC( VARIABLE ); // VARIABLE expands to 9 #define VARIABLE BOOST_PP_INC(VARIABLE) ... Of course, as I have written it, it does not work. What's the right way? Thanks a lot! Arno P.S. I don't want to iterate. FunctionA/B/C are all different constructs. I simply want to avoid forgetting to adjust all numbers when making a change to the chain of calls.