3 <title>BOOST_PP_REPEAT_FROM_TO_z
</title>
4 <link rel=
"stylesheet" type=
"text/css" href=
"../styles.css">
7 <div style=
"margin-left: 0px;">
8 The
<b>BOOST_PP_REPEAT_FROM_TO_
<i>z
</i></b> macro represents a reentry into the
<b>BOOST_PP_REPEAT_FROM_TO
</b> repetition construct.
12 <b>BOOST_PP_REPEAT_FROM_TO_
</b> ##
<i>z
</i>(
<i>first
</i>,
<i>last
</i>,
<i>macro
</i>,
<i>data
</i>)
18 The next available
<b>BOOST_PP_REPEAT
</b> dimension.
22 The lower bound of the repetition.
23 Valid values range from
<i>0</i> to
<b>BOOST_PP_LIMIT_MAG
</b>.
27 The upper bound of the repetition.
28 Valid values range from
<i>0</i> to
<b>BOOST_PP_LIMIT_MAG
</b>.
32 A ternary operation of the form
<i>macro
</i>(
<i>z
</i>,
<i>n
</i>,
<i>data
</i>).
33 This macro is expanded by
<b>BOOST_PP_REPEAT
</b> with the next available repetition depth,
34 the current repetition number, and the auxiliary
<i>data
</i> argument.
38 Auxiliary data passed to
<i>macro
</i>.
43 This macro expands to the sequence:
45 <i>macro
</i>(
<i>z
</i>,
<i>first
</i>,
<i>data
</i>)
<i>macro
</i>(
<i>z
</i>,
<i>first
</i> +
<i>1</i>,
<i>data
</i>) ...
<i>macro
</i>(
<i>z
</i>,
<i>last
</i> -
<i>1</i>,
<i>data
</i>)
49 The number of repetitions (i.e.
<i>last
</i> -
<i>first
</i>) must not exceed
<b>BOOST_PP_LIMIT_REPEAT
</b>.
52 At certain times, it may be necessary to perform the concatenation with
<b>BOOST_PP_CAT
</b> rather than the preprocessor token-pasting operator.
53 This happens when the
<i>z
</i> value is a macro invocation itself.
54 It needs a delay to allow it to expand.
55 The syntax in such a scenario becomes:
57 <b>BOOST_PP_CAT
</b>(
<b>BOOST_PP_REPEAT_FROM_TO_
</b>,
<i>z
</i>)(
<i>count
</i>,
<i>macro
</i>,
<i>data
</i>).
62 <li><a href=
"cat.html">BOOST_PP_CAT
</a></li>
63 <li><a href=
"limit_repeat.html">BOOST_PP_LIMIT_REPEAT
</a></li>
64 <li><a href=
"repeat.html">BOOST_PP_REPEAT
</a></li>
68 <b>Header:
</b> <a href=
"../headers/repetition/repeat_from_to.html"><boost/preprocessor/repetition/repeat_from_to.hpp
></a>
72 #include
<<a href=
"../headers/repetition/repeat_from_to.html">boost/preprocessor/repetition/repeat_from_to.hpp
</a>>
74 #define TEXT(z, n, data) n data
76 #define MACRO(z, n, data) \
78 <a href=
"repeat_from_to_z.html">BOOST_PP_REPEAT_FROM_TO_
</a> ## z( \
85 <a href=
"repeat.html">BOOST_PP_REPEAT
</a>(
3, MACRO, _)
94 <div style=
"margin-left: 0px;">
95 <i>© Copyright
<a href=
"http://www.housemarque.com" target=
"_top">Housemarque Oy
</a> 2002</i>
96 </br><i>© Copyright Paul Mensonides
2002</i>
98 <div style=
"margin-left: 0px;">
99 <p><small>Distributed under the Boost Software License, Version
1.0. (See
100 accompanying file
<a href=
"../../../../LICENSE_1_0.txt">LICENSE_1_0.txt
</a> or
102 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt
</a>)
</small></p>