]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/preprocessor/doc/ref/local_macro.html
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / preprocessor / doc / ref / local_macro.html
CommitLineData
7c673cae
FG
1<html>
2<head>
3 <title>BOOST_PP_LOCAL_MACRO</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_LOCAL_MACRO</b> macro is a user-defined <i>named external argument</i> used by <b>BOOST_PP_LOCAL_ITERATE</b>.
9 </div>
10 <h4>Usage</h4>
11 <div class="code">
12 #define <b>BOOST_PP_LOCAL_MACRO</b>(<i>n</i>) ...
13 </div>
14 <h4>Arguments</h4>
15 <dl>
16 <dt>n</dt>
17 <dd>
18 The current iteration value received from the <i>local-iteration</i> mechanism.
19 </dd>
20 </dl>
21 <h4>Remarks</h4>
22 <div>
23 This macro is automatically undefined for reuse by a call to <b>BOOST_PP_LOCAL_ITERATE</b>.
24 </div>
25 <h4>See Also</h4>
26 <ul>
27 <li><a href="local_iterate.html">BOOST_PP_LOCAL_ITERATE</a></li>
28 </ul>
29 <h4>Sample Code</h4>
30<div><pre>
31#include &lt;<a href="../headers/iteration/local.html">boost/preprocessor/iteration/local.hpp</a>&gt;
32
33template&lt;int&gt; struct sample;
34
35#define <a href="local_macro.html">BOOST_PP_LOCAL_MACRO</a>(n) \
36 template&lt;&gt; struct sample&lt;n&gt; { \
37 enum { value = n }; \
38 }; \
39 /**/
40
41#define <a href="local_limits.html">BOOST_PP_LOCAL_LIMITS</a> (1, 5)
42
43#include <a href="local_iterate.html">BOOST_PP_LOCAL_ITERATE</a>()
44/* expands to...
45template&lt;&gt; struct sample&lt;1&gt; { enum { value = 1 }; };
46template&lt;&gt; struct sample&lt;2&gt; { enum { value = 2 }; };
47template&lt;&gt; struct sample&lt;3&gt; { enum { value = 3 }; };
48template&lt;&gt; struct sample&lt;4&gt; { enum { value = 4 }; };
49template&lt;&gt; struct sample&lt;5&gt; { enum { value = 5 }; };
50*/
51</pre></div>
52 <hr size="1">
53 <div style="margin-left: 0px;">
54