3 <title>BOOST_PP_LIST_CONS
</title>
4 <link rel=
"stylesheet" type=
"text/css" href=
"../styles.css">
7 <div style=
"margin-left: 0px;">
8 The
<b>BOOST_PP_LIST_CONS
</b> macro is a
<i>list
</i> constructor.
12 <b>BOOST_PP_LIST_CONS
</b>(
<i>head
</i>,
<i>tail
</i>)
18 An element in a
<i>list
</i>.
22 Either a
<i>list
</i>,
<b>BOOST_PP_LIST_NIL
</b>, or
<b>BOOST_PP_NIL
</b>.
27 This macro appends a new head to an existing
<i>list
</i> or creates a
<i>list
</i> from
<b>BOOST_PP_LIST_NIL
</b>.
30 This macro is no longer necessary.
33 <b>BOOST_PP_LIST_CONS
</b>(a,
<b>BOOST_PP_LIST_CONS
</b>(b,
<b>BOOST_PP_LIST_NIL
</b>)))
35 ...is just an explicit way of writing the following:
37 (a, (b,
<b>BOOST_PP_NIL
</b>))
39 Because of this, this macro is deprecated.
43 <li><a href=
"list_nil.html">BOOST_PP_LIST_NIL
</a></li>
44 <li><a href=
"nil.html">BOOST_PP_NIL
</a></li>
48 <b>Header:
</b> <a href=
"../headers/list/adt.html"><boost/preprocessor/list/adt.hpp
></a>
52 #include
<<a href=
"../headers/list/adt.html">boost/preprocessor/list/adt.hpp
</a>>
55 <a href=
"list_cons.html">BOOST_PP_LIST_CONS
</a>( \
57 <a href=
"list_cons.html">BOOST_PP_LIST_CONS
</a>( \
59 <a href=
"list_cons.html">BOOST_PP_LIST_CONS
</a>( \
61 <a href=
"list_nil.html">BOOST_PP_LIST_NIL
</a> \
67 #define NEW (a, (b, (c,
<a href=
"nil.html">BOOST_PP_NIL
</a>)))
69 <a href=
"list_first.html">BOOST_PP_LIST_FIRST
</a>(OLD) ==
<a href=
"list_first.html">BOOST_PP_LIST_FIRST
</a>(NEW)
72 <a href=
"list_rest.html">BOOST_PP_LIST_REST
</a>(OLD) ==
<a href=
"list_rest.html">BOOST_PP_LIST_REST
</a>(NEW)
73 // expands to (b, (c,
<a href=
"nil.html">BOOST_PP_NIL
</a>)) == (b, (c,
<a href=
"nil.html">BOOST_PP_NIL
</a>))
76 <div style=
"margin-left: 0px;">
77 <i>© Copyright
<a href=
"http://www.housemarque.com" target=
"_top">Housemarque Oy
</a> 2002</i>
78 </br><i>© Copyright Paul Mensonides
2002</i>
80 <div style=
"margin-left: 0px;">
81 <p><small>Distributed under the Boost Software License, Version
1.0. (See
82 accompanying file
<a href=
"../../../../LICENSE_1_0.txt">LICENSE_1_0.txt
</a> or
84 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt
</a>)
</small></p>