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 <div style="margin-left: 0px;"> <i>� Copyright <a href="http://www.housemarque.com" 46 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> 53 </div> 54 </body> 55</html> 56