The BOOST_PP_SET_FOR_EACH_PRODUCT_R macro repeats a macro for each cartesian product of several sets.  It reenters BOOST_PP_FOR with maximum efficiency.

Usage

BOOST_PP_SET_FOR_EACH_PRODUCT_R(r, macro, sets)

Arguments

r
The next available BOOST_PP_FOR repetition.
macro
The binary macro of the form macro(r, product).  This macro is expanded by BOOST_PP_FOR_EACH_PRODUCT with each cartesian product in sets.  It is expanded with the next available BOOST_PP_FOR repetition and a set containing a cartesian product. 
sets
A set of sets from which cartesian products are obtained.

Remarks

This macro is a repetition construct.  If two sets are (a)(b)(c) and (x)(y)(z), this macro will produce the following sequence:
macro(r, (a)(x)) macro(r, (a)(y)) macro(r, (a)(z)) \
macro(r, (b)(x)) macro(r, (b)(y)) macro(r, (b)(z)) \
macro(r, (c)(x)) macro(r, (c)(y)) macro(r, (c)(z))

See Also

Requirements

Header:  <boost/preprocessor/set/for_each_product.hpp>