]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/preprocessor/doc/ref/enum_binary_params_z.html
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / preprocessor / doc / ref / enum_binary_params_z.html
1 <html>
2 <head>
3 <title>BOOST_PP_ENUM_BINARY_PARAMS_Z</title>
4 <link rel="stylesheet" type="text/css" href="../styles.css">
5 </head>
6 <body>
7 <div style="margin-left: 0px;">
8 The <b>BOOST_PP_ENUM_BINARY_PARAMS_Z</b> macro generates a comma-separated list of binary parameters.&nbsp;
9 It reenters <b>BOOST_PP_REPEAT</b> with maximum efficiency.
10 </div>
11 <h4>Usage</h4>
12 <div class="code">
13 <b>BOOST_PP_ENUM_BINARY_PARAMS_Z</b>(<i>z</i>, <i>count</i>, <i>p1</i>, <i>p2</i>)
14 </div>
15 <h4>Arguments</h4>
16 <dl>
17 <dt>z</dt>
18 <dd>
19 The next available <b>BOOST_PP_REPEAT</b> dimension.
20 </dd>
21 <dt>count</dt>
22 <dd>
23 The number of parameters to generate.&nbsp;
24 Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
25 </dd>
26 <dt>p1</dt>
27 <dd>
28 The text of the first part of the parameter.&nbsp;
29 <b>BOOST_PP_ENUM_BINARY_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
30 to generate parameters.
31 </dd>
32 <dt>p2</dt>
33 <dd>
34 The text of the first part of the parameter.&nbsp;
35 <b>BOOST_PP_ENUM_BINARY_PARAMS</b> concatenates numbers ranging from <i>0</i> to <i>count</i> - <i>1</i>
36 to generate parameters.
37 </dd>
38 </dl>
39 <h4>Remarks</h4>
40 <div>
41 This macro expands to the comma-separated sequence:
42 <div>
43 <i>p1</i> ## <i>0</i> <i>p2</i> ## <i>0</i>, <i>p1</i> ## <i>1</i> <i>p2</i> ## <i>1</i>, ... <i>p1</i> ## <i>count</i> - <i>1</i> <i>p2</i> ## <i>count</i> - <i>1</i>
44 </div>
45 </div>
46 <div>
47 This macro is a replacement for both <b>BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT</b> and <b>BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</b>.
48 </div>
49 <h4>See Also</h4>
50 <ul>
51 <li><a href="enum_binary_params.html">BOOST_PP_ENUM_BINARY_PARAMS</a></li>
52 <li><a href="enum_params_with_a_default.html">BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT</a></li>
53 <li><a href="enum_params_with_defaults.html">BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS</a></li>
54 <li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
55 </ul>
56 <h4>Requirements</h4>
57 <div>
58 <b>Header:</b> &nbsp;<a href="../headers/repetition/enum_binary_params.html">&lt;boost/preprocessor/repetition/enum_binary_params.hpp&gt;</a>
59 </div>
60 <h4>Sample Code</h4>
61 <div><pre>
62 #include &lt;<a href="../headers/arithmetic/inc.html">boost/preprocessor/arithmetic/inc.hpp</a>&gt;
63 #include &lt;<a href="../headers/repetition/enum_binary_params.html">boost/preprocessor/repetition/enum_binary_params.hpp</a>&gt;
64 #include &lt;<a href="../headers/repetition/enum_params.html">boost/preprocessor/repetition/enum_params.hpp</a>&gt;
65
66 #define FUNCTION(z, n, _) \
67 template&lt;<a href="enum_params_z.html">BOOST_PP_ENUM_PARAMS_Z</a>(z, <a href="inc.html">BOOST_PP_INC</a>(n), class T)&gt; \
68 void f(<a href="enum_binary_params_z.html">BOOST_PP_ENUM_BINARY_PARAMS_Z</a>(z, <a href="inc.html">BOOST_PP_INC</a>(n), T, p)) { \
69 /* ... */ \
70 } \
71 /**/
72
73 <a href="repeat.html">BOOST_PP_REPEAT</a>(2, FUNCTION, nil)
74 /*
75 expands to...
76
77 template&lt;class T0&gt; void f(T0 p0) { }
78 template&lt;class T0, class T1&gt; void f(T0 p0, T1 p1) { }
79 */
80 </pre></div>
81 <hr size="1">
82 <div style="margin-left: 0px;">
83 <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
84 </br><i>© Copyright Paul Mensonides 2002</i>
85 </div>
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> or
89 copy at <a href=
90 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
91 </div>
92 </body>
93 </html>