3 <meta content=
"text/html; charset=windows-1252" http-equiv=
"content-type">
4 <title>BOOST_PP_LIST_TO_TUPLE
</title>
5 <link rel=
"stylesheet" type=
"text/css" href=
"../styles.css">
8 <div style=
"margin-left: 0px;"> The
<b>BOOST_PP_LIST_TO_TUPLE
</b> macro
9 converts a
<i>list
</i> to a
<i>tuple
</i>.
</div>
11 <div class=
"code"> <b>BOOST_PP_LIST_TO_TUPLE
</b>(
<i>list
</i>)
</div>
15 <dd> The
<i>list
</i> to be converted.
</dd>
18 <div> If
<i>list
</i> is, for example, (
<i>a
</i>, (
<i>b
</i>, (
<i>c
</i>,
<b>BOOST_PP_NIL
</b>))),
19 this macro will produce:
20 <div> (
<i>a
</i>,
<i>b
</i>,
<i>c
</i>)
</div>
22 <div> Previously, this macro could not be used inside
<b>BOOST_PP_FOR
</b>.
23 There is no longer any such restriction.
It is more efficient,
24 however, to use
<b>BOOST_PP_LIST_TO_TUPLE_R
</b> in such a situation.
<br>
26 If the
<i>list
</i> to be converted is empty, as represented by 'BOOST_PP_NIL',
27 the resulting
<i>tuple
</i> is undefined since a
<i>tuple
</i> cannot be
31 <li><a href=
"list_to_tuple_r.html">BOOST_PP_LIST_TO_TUPLE_R
</a></li>
34 <div> <b>Header:
</b> <a href=
"../headers/list/to_tuple.html"><boost/preprocessor/list/to_tuple.hpp
></a>
38 <pre>#include
<<a href=
"../headers/list/to_tuple.html">boost/preprocessor/list/to_tuple.hpp
</a>>
40 #define LIST (w, (x, (y, (z,
<a href=
"nil.html">BOOST_PP_NIL
</a>))))
42 <a href=
"list_to_tuple.html">BOOST_PP_LIST_TO_TUPLE
</a>(LIST) // expands to (w, x, y, z)
45 <div style=
"margin-left: 0px;"> <i>© Copyright
<a href=
"http://www.housemarque.com"
47 target=
"_top">Housemarque Oy
</a> 2002</i> <br>
48 <i>© Copyright Paul Mensonides
2002</i> </div>
49 <div style=
"margin-left: 0px;">
50 <p><small>Distributed under the Boost Software License, Version
1.0. (See
51 accompanying file
<a href=
"../../../../LICENSE_1_0.txt">LICENSE_1_0.txt
</a>
52 or copy at
<a href=
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt
</a>)
</small></p>