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">
8 <div style=
"margin-left: 0px;"> The
<b>BOOST_PP_TUPLE_INSERT
</b> macro
9 inserts an element into an
<i>tuple
</i>.
</div>
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>
16 <dd> The
<i>tuple
</i> into which an element is to be inserted.
</dd>
18 <dd> The zero-based position in
<i>tuple
</i> where an element is to be
19 inserted.
Valid values range from
<i>0</i> to
<b>BOOST_PP_TUPLE_SIZE
</b>(
<i>tuple
</i>).
</dd>
21 <dd> The element to insert.
</dd>
24 <div> This macro inserts
<i>elem
</i> before the element at index
<i>i
</i>.
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.
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>
33 <li><a href=
"tuple_insert_d.html">BOOST_PP_TUPLE_INSERT_D
</a></li>
36 <div> <b>Header:
</b> <a href=
"../headers/tuple/insert.html"><boost/preprocessor/tuple/insert.hpp
></a>
40 <pre>#include
<<a href=
"../headers/tuple/insert.html">boost/preprocessor/tuple/insert.hpp
</a>>
42 #define TUPLE (a, b, d)
44 <a href=
"tuple_insert.html">BOOST_PP_TUPLE_INSERT
</a>(TUPLE,
2, c) // expands to (a, b, c, d)
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>