Hicham Mouline | 9 Feb 21:59

PP: transform BOOST_PP_SEQ_FOR_EACH(macro, data, seq) to vertical repetition

Hi,

 

For a given result of

   BOOST_PP_SEQ_FOR_EACH(macro,data,seq)

 

It is possible to obtain the same result, but in vertical repetition instead, with:

 

#define BOOST_PP_LOCAL_MACRO(n) macro(_,data, BOOST_PP_SEQ_ELEM(n, seq))

#define BOOST_PP_LOCAL_LIMITS (0,BOOST_PP_DEC( BOOST_PP_SEQ_SIZE(seq)))

#include BOOST_PP_LOCAL_ITERATE()

 

I can’t see the way to implement a new macro called

  BOOST_PP_SEQ_FOR_EACH_VERTICAL(macro,data,seq)

 

Regards,

_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Gmane