3 <title>BOOST_PP_SEQ_FOR_EACH
</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
</b> macro repeats a macro for each element in a
<i>seq
</i>.
14 <b>BOOST_PP_SEQ_FOR_EACH
</b>(
<i>macro
</i>,
<i>data
</i>,
<i>seq
</i>)
22 A ternary macro of the form
<i>macro
</i>(
<i>r
</i>,
<i>data
</i>,
<i>elem
</i>).
23 This macro is expanded by
<b>BOOST_PP_SEQ_FOR_EACH
</b> with each element in
<i>seq
</i>.
24 It is expanded with the next available
<b>BOOST_PP_FOR
</b> repetition, the
25 auxiliary
<i>data
</i>, and the current element.
29 Auxiliary data passed to
<i>macro
</i>.
33 The
<i>seq
</i> for which
<i>macro
</i> will be invoked on each element.
40 This macro is a repetition construct.
If
<i>seq
</i> is (
<i>a
</i>)(
<i>b
</i>)(
<i>c
</i>),
41 it expands to the sequence:
43 <i>macro
</i>(
<i>r
</i>,
<i>data
</i>,
<i>a
</i>)
<i>macro
</i>(
<i>r
</i>,
<i>data
</i>,
44 <i>b
</i>)
<i>macro
</i>(
<i>r
</i>,
<i>data
</i>,
<i>c
</i>)
48 For maximum efficiency, use
<b>BOOST_PP_SEQ_FOR_EACH_R
</b>.
55 <a href=
"seq_for_each_r.html">BOOST_PP_SEQ_FOR_EACH_R
</a></li>
61 <b>Header:
</b> <a href=
"../headers/seq/for_each.html"><boost/preprocessor/seq/for_each.hpp
></a>
68 #include
<<a href=
"../headers/cat.html">boost/preprocessor/cat.hpp
</a>>
69 #include
<<a href=
"../headers/seq/for_each.html">boost/preprocessor/seq/for_each.hpp
</a>>
71 #define SEQ (w)(x)(y)(z)
73 #define MACRO(r, data, elem)
<a href=
"cat.html">BOOST_PP_CAT
</a>(elem, data)
75 <a href=
"seq_for_each.html">BOOST_PP_SEQ_FOR_EACH
</a>(MACRO, _, SEQ) // expands to w_ x_ y_ z_
79 <div style=
"margin-left: 0px;">
80 <i>© Copyright
<a href=
"http://www.housemarque.com" target=
"_top">Housemarque Oy
</a> 2002</i>
81 </br><i>© Copyright Paul Mensonides
2002</i>
83 <div style=
"margin-left: 0px;">
84 <p><small>Distributed under the Boost Software License, Version
1.0. (See
85 accompanying file
<a href=
"../../../../LICENSE_1_0.txt">LICENSE_1_0.txt
</a> or
87 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt
</a>)
</small></p>