Boost logo

Boost Users :

Subject: Re: [Boost-users] [preprocessor] BOOST_PP_REPEAT with multiple "data"
From: Igor R (boost.lists_at_[hidden])
Date: 2014-05-29 02:49:32


>
> #define EXPR(unused, x, data) \
>>
> case x: my_func(BOOST_PP_TUPLE_ELEM(2, 0, data) , offsetof(my_struct,
> arr[x].BOOST_PP_TUPLE_ELEM(2, 1, data)))); break;
>
> #define MY_MACRO(x, arg, my_field) \
> switch(i)\
> {\
> BOOST_PP_REPEAT(x, EXPR, (arg, my_field))\
> }
>

Great. PP_TUPLE was exactly was I needed.

Thanks a lot.



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