]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/preprocessor/doc/ref/tuple_insert.html
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / preprocessor / doc / ref / tuple_insert.html
1 <html>
2 <head>
3 <meta content="text/html; charset=windows-1252" http-equiv="content-type">
4 <title>BOOST_PP_TUPLE_INSERT</title>
5 <link rel="stylesheet" type="text/css" href="../styles.css">
6 </head>
7 <body>
8 <div style="margin-left: 0px;"> The <b>BOOST_PP_TUPLE_INSERT</b> macro
9 inserts an element into an <i>tuple</i>.</div>
10 <h4>Usage</h4>
11 <div class="code"> <b>BOOST_PP_TUPLE_INSERT</b>(<i>tuple</i>, <i>i</i>, <i>elem</i>)
12 <a href="../topics/variadic_macros.html#VNotation"><sup>(v)</sup></a></div>
13 <h4>Arguments</h4>
14 <dl>
15 <dt>tuple</dt>
16 <dd> The <i>tuple</i> into which an element is to be inserted. </dd>
17 <dt>i</dt>
18 <dd> The zero-based position in <i>tuple</i> where an element is to be
19 inserted.&nbsp; Valid values range from <i>0</i> to <b>BOOST_PP_TUPLE_SIZE</b>(<i>tuple</i>).</dd>
20 <dt>elem</dt>
21 <dd> The element to insert. </dd>
22 </dl>
23 <h4>Remarks</h4>
24 <div> This macro inserts <i>elem</i> before the element at index <i>i</i>.
25 </div>
26 <div> If the operation attempts to create an <i>tuple</i> that is larger
27 than <b>BOOST_PP_LIMIT_TUPLE</b>, the result is undefined.</div>
28 <div> This macro uses <b>BOOST_PP_WHILE</b> interally.&nbsp; Therefore, to
29 use the <i>d</i> parameter passed from other macros that use <b>BOOST_PP_WHILE</b>,
30 see <b>BOOST_PP_TUPLE_INSERT_D</b>.</div>
31 <h4>See Also</h4>
32 <ul>
33 <li><a href="tuple_insert_d.html">BOOST_PP_TUPLE_INSERT_D</a></li>
34 </ul>
35 <h4>Requirements</h4>
36 <div> <b>Header:</b> &nbsp;<a href="../headers/tuple/insert.html">&lt;boost/preprocessor/tuple/insert.hpp&gt;</a>
37 </div>
38 <h4>Sample Code</h4>
39 <div>
40 <pre>#include &lt;<a href="../headers/tuple/insert.html">boost/preprocessor/tuple/insert.hpp</a>&gt;
41
42 #define TUPLE (a, b, d)
43
44 <a href="tuple_insert.html">BOOST_PP_TUPLE_INSERT</a>(TUPLE, 2, c) // expands to (a, b, c, d)
45 </pre></div>
46 <hr size="1">
47 <div style="margin-left: 0px;"> <i>© Copyright Edward Diener 2013</i> </div>
48 <div style="margin-left: 0px;">
49 <p><small>Distributed under the Boost Software License, Version 1.0. (See
50 accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
51 or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
52 </div>
53 </body>
54 </html>