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">
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>
11 <div class=
"code"> <b>BOOST_PP_LIST_TO_ARRAY
</b>(
<i>list
</i>)
</div>
15 <dd> The
<i>list
</i> to be converted.
<br>
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>
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, ()
27 <li><a href=
"list_to_array_d.html">BOOST_PP_LIST_TO_ARRAY_D
</a></li>
29 <h4> Requirements
</h4>
30 <div> <b>Header:
</b> <a href=
"../headers/list/to_array.html"><boost/preprocessor/list/to_array.hpp
></a>
32 <h4> Sample Code
</h4>
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
36 href=
"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>
39 <div style=
"margin-left: 0px;"> <i></i><i>© Copyright Edward Diener
2011</i>
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>