1<html> 2 <head> 3 <meta content="text/html; charset=windows-1252" http-equiv="content-type"> 4 <title>BOOST_PP_LIST_TO_ARRAY</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_ARRAY</b> macro 9 converts a <i>list</i> to an <i>array</i>. </div> 10 <h4> Usage </h4> 11 <div class="code"> <b>BOOST_PP_LIST_TO_ARRAY</b>(<i>list</i>) </div> 12 <h4> Arguments </h4> 13 <dl> 14 <dt>list</dt> 15 <dd> The <i>list</i> to be converted. <br> 16 </dd> 17 </dl> 18 <h4>Remarks</h4> 19 <div> This macro uses <b>BOOST_PP_WHILE</b>. Within <b>BOOST_PP_WHILE</b>, 20 it is more efficient to use <b>BOOST_PP_LIST_TO_ARRAY_D</b>.<br> 21 <br> 22 If the <i>list</i> to be converted is empty, as represented by 23 'BOOST_PP_NIL', the resulting <i>array</i> is empty, as represented by '( 0, () 24 )'.</div> 25 <h4>See Also</h4> 26 <ul> 27 <li><a href="list_to_array_d.html">BOOST_PP_LIST_TO_ARRAY_D</a></li> 28 </ul> 29 <h4> Requirements </h4> 30 <div> <b>Header:</b> <a href="../headers/list/to_array.html"><boost/preprocessor/list/to_array.hpp></a> 31 </div> 32 <h4> Sample Code </h4> 33 <div> 34 <pre>#include <<a href="../headers/list/to_array.html">boost/preprocessor/list/to_array.hpp</a>><br><br>#define LIST (a, (b, (c, <a 35 36href="nil.html">BOOST_PP_NIL</a>)))<br><br><a href="list_to_array.html">BOOST_PP_LIST_TO_ARRAY</a>(LIST) // expands to (3, (a, b, c))</pre> 37 </div> 38 <hr size="1"> 39 <div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener 2011</i> 40 </div> 41 <div style="margin-left: 0px;"> 42 <p><small>Distributed under the Boost Software License, Version 1.0. (See 43 accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> 44 or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p> 45 </div> 46 </body> 47</html> 48