list_nil.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <html>
  2. <head>
  3. <title>BOOST_PP_LIST_NIL</title>
  4. <link rel="stylesheet" type="text/css" href="../styles.css">
  5. </head>
  6. <body>
  7. <div style="margin-left: 0px;">
  8. The <b>BOOST_PP_LIST_NIL</b> macro is a nil <i>list</i> constructor.
  9. </div>
  10. <h4>Usage</h4>
  11. <div class="code">
  12. <b>BOOST_PP_LIST_NIL</b>
  13. </div>
  14. <h4>Remarks</h4>
  15. <div>
  16. This macro represents the end of a <i>list</i>.
  17. </div>
  18. <div>
  19. This macro is no longer necessary.&nbsp;
  20. It simply expands to <b>BOOST_PP_NIL</b>.&nbsp;
  21. Because of this, this macro is deprecated.
  22. </div>
  23. <h4>See Also</h4>
  24. <ul>
  25. <li><a href="nil.html">BOOST_PP_NIL</a></li>
  26. </ul>
  27. <h4>Requirements</h4>
  28. <div>
  29. <b>Header:</b> &nbsp;<a href="../headers/list/adt.html">&lt;boost/preprocessor/list/adt.hpp&gt;</a>
  30. </div>
  31. <h4>Sample Code</h4>
  32. <div><pre>
  33. #include &lt;<a href="../headers/list/adt.html">boost/preprocessor/list/adt.hpp</a>&gt;
  34. #define OLD \
  35. <a href="list_cons.html">BOOST_PP_LIST_CONS</a>( \
  36. a, \
  37. <a href="list_cons.html">BOOST_PP_LIST_CONS</a>( \
  38. b, \
  39. <a href="list_cons.html">BOOST_PP_LIST_CONS</a>( \
  40. c, \
  41. <a href="list_nil.html">BOOST_PP_LIST_NIL</a> \
  42. ) \
  43. ) \
  44. ) \
  45. /**/
  46. #define NEW (a, (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)))
  47. <a href="list_first.html">BOOST_PP_LIST_FIRST</a>(OLD) == <a href="list_first.html">BOOST_PP_LIST_FIRST</a>(NEW)
  48. // expands to a == a
  49. <a href="list_rest.html">BOOST_PP_LIST_REST</a>(OLD) == <a href="list_rest.html">BOOST_PP_LIST_RESTK</a>(NEW)
  50. // expands to (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)) == (b, (c, <a href="nil.html">BOOST_PP_NIL</a>))
  51. </pre></div>
  52. <hr size="1">
  53. <div style="margin-left: 0px;">
  54. <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
  55. </br><i>© Copyright Paul Mensonides 2002</i>
  56. </div>
  57. <div style="margin-left: 0px;">
  58. <p><small>Distributed under the Boost Software License, Version 1.0. (See
  59. accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
  60. copy at <a href=
  61. "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
  62. </div>
  63. </body>
  64. </html>