Boost preprocessor library
I'm having some trouble expanding to the base value
# include <boost/preprocessor/cat.hpp>
#define REL_ITERATION_1 1
#define REL_FRAME_ITERATION(i) BOOST_PP_CAT(REL_ITERATION_, i)
#define REL_ITERATION_PARAMS_2 REL_FRAME_ITERATION(1)
#define REL_FRAME1(i) BOOST_PP_CAT(REL_ITERATION_PARAMS_, i)
#define REL_FRAME2(i) REL_ITERATION_PARAMS_##i
Here's the output.
Does anyone have any idea why the first call is not the same as the second? I thought I had a handle on using the preprocessor, but I just don't get this. :(
Never mind. I missed the part in the documentation where it says if it expands to a BOOST_PP_CAT() macro, it won't expand it.
Topic archived. No new replies allowed.