R A :
 
Look at the documentation for the BOOST_PP_SEQ_FOR_EACH macro. The example on that page does exactly what your pseudo-code is trying to do.
 
 
On Tue, May 24, 2011 at 4:11 PM, Michael Caisse <boost@objectmodelingdesigns.com> wrote:

A little time with the Boost.Preprocessor library documentation should get you going.

<http://www.boost.org/doc/libs/1_46_1/libs/preprocessor/doc/index.html>