7 Aug
2013
7 Aug
'13
6:49 p.m.
I can't figure out what I'm doing wrong. According to the docs, this should work: #define S0 (0)(1)(2)(3) #define S1 (5)(6)(7)(8) #define M4(R, DATA, ELEM) (DATA,ELEM) #define M2(R, DATA, ELEM) BOOST_PP_SEQ_FOR_EACH_R(R, M4, ELEM, S1); BOOST_PP_SEQ_FOR_EACH(M2, ~, S0) I expect to get a sequence like (0,1)(0,2)... for each combination. I get gibberish. (Please don't tell me to use FOR_EACH_PRODUCT. In my real use case, M2 and M4 are far more complicated, and a simple product won't do.) Can anybody please tell me what I'm doing wrong? TIA, -- Eric Niebler Boost.org