Boost logo

Boost Users :

Subject: Re: [Boost-users] BOOST_PP_REPEAT to repeat comma-containing text
From: Igor R (boost.lists_at_[hidden])
Date: 2014-04-08 09:07:22


> 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!


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net