3 <meta content=
"text/html; charset=windows-1252" http-equiv=
"content-type">
4 <title>BOOST_PP_REPEAT_z
</title>
5 <link rel=
"stylesheet" type=
"text/css" href=
"../styles.css">
8 <div style=
"margin-left: 0px;"> The
<b>BOOST_PP_REPEAT_
<i>z
</i></b> macro
9 represents a reentry into the
<b>BOOST_PP_REPEAT
</b> repetition
12 <div class=
"code"> <b>BOOST_PP_REPEAT_
</b> ##
<i>z
</i>(
<i>count
</i>,
<i>macro
</i>,
17 <dd> The next available
<b>BOOST_PP_REPEAT
</b> dimension.
</dd>
19 <dd> The number of repetitious calls to
<i>macro
</i>.
Valid values
20 range from
<i>0</i> to
<b>BOOST_PP_LIMIT_REPEAT
</b>.
</dd>
22 <dd> A ternary operation of the form
<i>macro
</i>(
<i>z
</i>,
<i>n
</i>,
<i>data
</i>).
23 This macro is expanded by
<b>BOOST_PP_REPEAT
</b> with the next
24 available repetition depth, the current repetition number, and the
25 auxiliary
<i>data
</i> argument.
</dd>
27 <dd> Auxiliary data passed to
<i>macro
</i>.
</dd>
30 <div> This macro expands to the sequence:
31 <div> <i>macro
</i>(
<i>z
</i>,
<i>0</i>,
<i>data
</i>)
<i>macro
</i>(
<i>z
</i>,
32 <i>1</i>,
<i>data
</i>) ...
<i>macro
</i>(
<i>z
</i>,
<i>count
</i> -
<i>1</i>,
35 <div> At certain times, it may be necessary to perform the concatenation
36 with
<b>BOOST_PP_CAT
</b> rather than the preprocessor token-pasting
37 operator.
This happens when the
<i>z
</i> value is a macro
38 invocation itself.
It needs a delay to allow it to expand.
The
39 syntax in such a scenario becomes:
40 <div> <b>BOOST_PP_CAT
</b>(
<b>BOOST_PP_REPEAT_
</b>,
<i>z
</i>)(
<i>count
</i>,
41 <i>macro
</i>,
<i>data
</i>)
</div>
45 <li><a href=
"cat.html">BOOST_PP_CAT
</a></li>
46 <li><a href=
"limit_repeat.html">BOOST_PP_LIMIT_REPEAT
</a></li>
47 <li><a href=
"repeat.html">BOOST_PP_REPEAT
</a></li>
48 <li><a href=
"repeat_z_macros.html"><span style=
"color: gray;">Macros with
49 Z re-entrancy forms
</span></a></li>
52 <div> <b>Header:
</b> <a href=
"../headers/repetition/repeat.html"><boost/preprocessor/repetition/repeat.hpp
></a>
56 <pre>#include
<<a href=
"../headers/arithmetic/inc.html">boost/preprocessor/arithmetic/inc.hpp
</a>>
57 #include
<<a href=
"../headers/punctuation/comma_if.html">boost/preprocessor/punctuation/comma_if.hpp
</a>>
58 #include
<<a href=
"../headers/repetition/repeat.html">boost/preprocessor/repetition/repeat.hpp
</a>>
60 #define TEXT(z, n, text)
<a href=
"comma_if.html">BOOST_PP_COMMA_IF
</a>(n) text
62 #define TEMPLATE(z, n, _) \
63 <a href=
"comma_if.html">BOOST_PP_COMMA_IF
</a>(n) \
65 <a href=
"repeat_z.html">BOOST_PP_REPEAT_
</a> ## z( \
66 <a href=
"inc.html">BOOST_PP_INC
</a>(n), \
72 <a href=
"repeat.html">BOOST_PP_REPEAT
</a>(
3, TEMPLATE, nil)
75 template
<class
> class T0,
76 template
<class, class
> class T1,
77 template
<class, class, class
> class T2
81 <div style=
"margin-left: 0px;"> <i>© Copyright
<a href=
"http://www.housemarque.com"
82 target=
"_top">Housemarque Oy
</a> 2002</i> <br>
83 <i>© Copyright Paul Mensonides
2002<br>
84 </i><i>© Copyright Edward Diener
2014</i><br>
86 <div style=
"margin-left: 0px;">
87 <p><small>Distributed under the Boost Software License, Version
1.0. (See
88 accompanying file
<a href=
"../../../../LICENSE_1_0.txt">LICENSE_1_0.txt
</a>
89 or copy at
<a href=
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt
</a>)
</small></p>