3 <title>BOOST_PP_SEQ_FOR_EACH_PRODUCT
</title>
4 <link rel=
"stylesheet" type=
"text/css" href=
"../styles.css">
7 <div style=
"margin-left: 0px;">
8 The
<b>BOOST_PP_SEQ_FOR_EACH_PRODUCT
</b> macro repeats a macro for each
9 cartesian product of several
<i>seqs
</i>.
15 <b>BOOST_PP_SEQ_FOR_EACH_PRODUCT
</b>(
<i>macro
</i>,
<i>seqs
</i>)
23 The binary macro of the form
<i>macro
</i>(
<i>r
</i>,
<i>product
</i>).
This
24 macro is expanded by
<b>BOOST_PP_FOR_EACH_PRODUCT
</b> with each cartesian
25 product in
<i>seqs
</i>.
It is expanded with the next available
<b>BOOST_PP_FOR
</b>
26 repetition and a
<i>seq
</i> containing a cartesian product.
30 A
<i>seq
</i> of
<i>seqs
</i> from which cartesian products are obtained.
37 This macro is a repetition construct.
If two
<i>seqs
</i> are (
<i>a
</i>)(
<i>b
</i>)(
<i>c
</i>)
38 and (
<i>x
</i>)(
<i>y
</i>)(
<i>z
</i>), this macro will produce the following
41 <i>macro
</i>(
<i>r
</i>, (
<i>a
</i>)(
<i>x
</i>))
<i>macro
</i>(
<i>r
</i>, (
<i>a
</i>)(
<i>y
</i>))
42 <i>macro
</i>(
<i>r
</i>, (
<i>a
</i>)(
<i>z
</i>)) \
44 <i>macro
</i>(
<i>r
</i>, (
<i>b
</i>)(
<i>x
</i>))
<i>macro
</i>(
<i>r
</i>, (
<i>b
</i>)(
<i>y
</i>))
45 <i>macro
</i>(
<i>r
</i>, (
<i>b
</i>)(
<i>z
</i>)) \
47 <i>macro
</i>(
<i>r
</i>, (
<i>c
</i>)(
<i>x
</i>))
<i>macro
</i>(
<i>r
</i>, (
<i>c
</i>)(
<i>y
</i>))
48 <i>macro
</i>(
<i>r
</i>, (
<i>c
</i>)(
<i>z
</i>))
52 For maximum efficiency, use
<b>BOOST_PP_SEQ_FOR_EACH_PRODUCT_R
</b>.
59 <a href=
"seq_for_each_product_r.html">BOOST_PP_SEQ_FOR_EACH_PRODUCT_R
</a></li>
65 <b>Header:
</b> <a href=
"../headers/seq/for_each_product.html"><boost/preprocessor/seq/for_each_product.hpp
></a>
72 #include
<<a href=
"../headers/seq/for_each_product.html">boost/preprocessor/seq/for_each_product.hpp
</a>>
73 #include
<<a href=
"../headers/seq/to_tuple.html">boost/preprocessor/seq/to_tuple.hpp
</a>>
79 #define MACRO(r, product)
<a href=
"seq_to_tuple.html">BOOST_PP_SEQ_TO_TUPLE
</a>(product)
81 <a href=
"seq_for_each_product.html">BOOST_PP_SEQ_FOR_EACH_PRODUCT
</a>(MACRO, (S1)(S2)(S3))
83 // (a, x, p) (a, x, q) (a, y, p) (a, y, q) (a, z, p) (a, z, q)
84 // (b, x, p) (b, x, q) (b, y, p) (b, y, q) (b, z, p) (b, z, q)
85 // (c, x, p) (c, x, q) (c, y, p) (c, y, q) (c, z, p) (c, z, q)
89 <div style=
"margin-left: 0px;">
90 <i>© Copyright
<a href=
"http://www.housemarque.com" target=
"_top">Housemarque Oy
</a> 2002</i>
91 </br><i>© Copyright Paul Mensonides
2002</i>
93 <div style=
"margin-left: 0px;">
94 <p><small>Distributed under the Boost Software License, Version
1.0. (See
95 accompanying file
<a href=
"../../../../LICENSE_1_0.txt">LICENSE_1_0.txt
</a> or
97 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt
</a>)
</small></p>