Brian Silverman | f27e085 | 2018-08-04 23:56:45 -0700 | [diff] [blame^] | 1 | <html> |
| 2 | <head> |
| 3 | <meta content="text/html; charset=windows-1252" http-equiv="content-type"> |
| 4 | <title>lists.html</title> |
| 5 | <link rel="stylesheet" type="text/css" href="../styles.css"> |
| 6 | </head> |
| 7 | <body> |
| 8 | <h4>Lists</h4> |
| 9 | <div> A <i>list</i> is a simple cons-style list with a head and a |
| 10 | tail. The head of a <i>list</i> is an element, and the tail is |
| 11 | either another <i>list</i> or <b>BOOST_PP_NIL</b>. For example, </div> |
| 12 | <div class="code"> (<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>))) |
| 13 | </div> |
| 14 | <div> ...is a <i>list</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and <i>c</i>. |
| 15 | </div> |
| 16 | <div> This allows macro parameters to be variable in size and allows data |
| 17 | states to change size without the user explicitly keeping track of the |
| 18 | size independently.<br> |
| 19 | <br> |
| 20 | A list can be empty and therefore have a size of 0. An empty list is |
| 21 | represented by the notation <b>BOOST_PP_NIL.<br> |
| 22 | <br> |
| 23 | </b></div> |
| 24 | <div> Elements of a <i>list</i> can be extracted with <b>BOOST_PP_LIST_FIRST</b> |
| 25 | and <b>BOOST_PP_LIST_REST</b>. </div> |
| 26 | <h4>Primitives</h4> |
| 27 | <ul> |
| 28 | <li><a href="../ref/list_first.html">BOOST_PP_LIST_FIRST</a></li> |
| 29 | <li><a href="../ref/list_rest.html">BOOST_PP_LIST_REST</a></li> |
| 30 | <li><a href="../ref/nil.html">BOOST_PP_NIL</a></li> |
| 31 | </ul> |
| 32 | <hr size="1"> |
| 33 | <div style="margin-left: 0px;"> <i>© Copyright <a href="http://www.housemarque.com" |
| 34 | target="_top">Housemarque Oy</a> 2002</i> <br> |
| 35 | <i>© Copyright Paul Mensonides 2002</i> </div> |
| 36 | <div style="margin-left: 0px;"> |
| 37 | <p><small>Distributed under the Boost Software License, Version 1.0. (See |
| 38 | accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> |
| 39 | or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p> |
| 40 | </div> |
| 41 | </body> |
| 42 | </html> |