]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <html> |
2 | <head> | |
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"> | |
6 | </head> | |
7 | <body> | |
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> | |
10 | <h4>Usage</h4> | |
11 | <div class="code"> <b>BOOST_PP_LIST_TO_TUPLE</b>(<i>list</i>) </div> | |
12 | <h4>Arguments</h4> | |
13 | <dl> | |
14 | <dt>list</dt> | |
15 | <dd> The <i>list</i> to be converted. </dd> | |
16 | </dl> | |
17 | <h4>Remarks</h4> | |
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> | |
21 | </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> | |
25 | <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 | |
28 | empty.</div> | |
29 | <h4>See Also</h4> | |
30 | <ul> | |
31 | <li><a href="list_to_tuple_r.html">BOOST_PP_LIST_TO_TUPLE_R</a></li> | |
32 | </ul> | |
33 | <h4>Requirements</h4> | |
34 | <div> <b>Header:</b> <a href="../headers/list/to_tuple.html"><boost/preprocessor/list/to_tuple.hpp></a> | |
35 | </div> | |
36 | <h4>Sample Code</h4> | |
37 | <div> | |
38 | <pre>#include <<a href="../headers/list/to_tuple.html">boost/preprocessor/list/to_tuple.hpp</a>> | |
39 | ||
40 | #define LIST (w, (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>)))) | |
41 | ||
42 | <a href="list_to_tuple.html">BOOST_PP_LIST_TO_TUPLE</a>(LIST) // expands to (w, x, y, z) | |
43 | </pre></div> | |
44 | <hr size="1"> | |
45 |