
8 Apr
2014
8 Apr
'14
7:07 a.m.
example:
#include <boost/preprocessor/arithmetic/add.hpp> #include <boost/preprocessor/arithmetic/sub.hpp> #include <boost/preprocessor/repetition/repeat.hpp>
#define PP_PROC(unused1, idx, from) \ param1, param2, arr1[BOOST_PP_ADD(from, idx)], arr2[BOOST_PP_ADD(from, idx)],
#define MY_REPEAT(from, to) \ BOOST_PP_REPEAT( \ BOOST_PP_SUB(to, from) \ ,PP_PROC \ ,from \ )
Great, thanks!