forked from boostorg/preprocessor
59 lines
1.7 KiB
HTML
59 lines
1.7 KiB
HTML
![]() |
<html>
|
||
|
<head>
|
||
|
<title>BOOST_PP_LIST_NIL</title>
|
||
|
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||
|
<script language="javascript" type="text/javascript" src="../scripts.js"></script>
|
||
|
</head>
|
||
|
<body onload="init('sample');">
|
||
|
<div style="margin-left: 0px;">
|
||
|
The <b>BOOST_PP_LIST_NIL</b> macro is a nil <i>list</i> constructor.
|
||
|
</div>
|
||
|
<h4>Usage</h4>
|
||
|
<div class="code">
|
||
|
<b>BOOST_PP_LIST_NIL</b>
|
||
|
</div>
|
||
|
<h4>Remarks</h4>
|
||
|
<div>
|
||
|
This macro represents the end of a <i>list</i>.
|
||
|
</div>
|
||
|
<div>
|
||
|
This macro is no longer necessary.
|
||
|
It simply expands to <b>BOOST_PP_NIL</b>.
|
||
|
Because of this, this macro is deprecated.
|
||
|
</div>
|
||
|
<h4>See Also</h4>
|
||
|
<ul>
|
||
|
<li><a href="nil.html">BOOST_PP_NIL</a></li>
|
||
|
</ul>
|
||
|
<h4>Requirements</h4>
|
||
|
<div>
|
||
|
<b>Header:</b> <a href="../headers/list/adt.hpp.html"><boost/preprocessor/list/adt.hpp></a>
|
||
|
</div>
|
||
|
<h4><a class="local" onclick="toggle('sample');" onmouseover="change(this);" onmouseout="revert(this);">Sample Code</a></h4>
|
||
|
<div id="sample"><pre>
|
||
|
#include <boost/preprocessor/list/adt.hpp>
|
||
|
|
||
|
#define OLD /* ........... */ \
|
||
|
BOOST_PP_LIST_CONS( \
|
||
|
a, \
|
||
|
BOOST_PP_LIST_CONS( \
|
||
|
b, \
|
||
|
BOOST_PP_LIST_CONS( \
|
||
|
c, \
|
||
|
BOOST_PP_LIST_NIL \
|
||
|
) \
|
||
|
) \
|
||
|
) \
|
||
|
/**/
|
||
|
|
||
|
#define NEW (a, (b, (c, BOOST_PP_NIL)))
|
||
|
|
||
|
BOOST_PP_LIST_FIRST(OLD) == BOOST_PP_LIST_FIRST(NEW)
|
||
|
// expands to a == a
|
||
|
|
||
|
BOOST_PP_LIST_REST(OLD) == BOOST_PP_LIST_REST(NEW)
|
||
|
// expands to (b, (c, BOOST_PP_NIL)) == (b, (c, BOOST_PP_NIL))
|
||
|
<pre></div>
|
||
|
</body>
|
||
|
</html>
|