Boost logo

Boost Users :

Subject: [Boost-users] PP: transform BOOST_PP_SEQ_FOR_EACH(macro, data, seq) to vertical repetition
From: Hicham Mouline (hicham_at_[hidden])
Date: 2010-02-09 15:59:28


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