]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/preprocessor/doc/ref/list_rest_n.html
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / preprocessor / doc / ref / list_rest_n.html
CommitLineData
7c673cae
FG
1<html>
2<head>
3 <title>BOOST_PP_LIST_REST_N</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_REST_N</b> macro expands to a <i>list</i> of all but the first <i>count</i> elements of a <i>list</i>.
9 </div>
10 <h4>Usage</h4>
11 <div class="code">
12 <b>BOOST_PP_LIST_REST_N</b>(<i>count</i>, <i>list</i>)
13 </div>
14 <h4>Arguments</h4>
15 <dl>
16 <dt>count</dt>
17 <dd>
18 The number of elements to remove from the beginning of <i>list</i>.
19 </dd>
20 <dt>list</dt>
21 <dd>
22 The <i>list</i> from which the elements are extracted.
23 </dd>
24 </dl>
25 <h4>Remarks</h4>
26 <div>
27 This macro removes <i>count</i> elements from the beginning of <i>list</i> and returns the remainder as a <i>list</i>
28 </div>
29 <div>
30 Previously, this macro could not be used inside <b>BOOST_PP_WHILE</b>.&nbsp;
31 There is no longer any such restriction.&nbsp;
32 It is more efficient, however, to use <b>BOOST_PP_LIST_REST_N_D</b> in such a situation.
33 </div>
34 <h4>See Also</h4>
35 <ul>
36 <li><a href="list_rest_n_d.html">BOOST_PP_LIST_REST_N_D</a></li>
37 </ul>
38 <h4>Requirements</h4>
39 <div>
40 <b>Header:</b> &nbsp;<a href="../headers/list/rest_n.html">&lt;boost/preprocessor/list/rest_n.hpp&gt;</a>
41 </div>
42 <h4>Sample Code</h4>
43<div><pre>
44#include &lt;<a href="../headers/list/rest_n.html">boost/preprocessor/list/rest_n.hpp</a>&gt;
45
46#define LIST (a, (b, (c, (d, <a href="nil.html">BOOST_PP_NIL</a>))))
47
48<a href="list_rest_n.html">BOOST_PP_LIST_REST_N</a>(2, LIST) // expands to (c, (d, <a href="nil.html">BOOST_PP_NIL</a>))
49</pre></div>
50 <hr size="1">
51 <div style="margin-left: 0px;">
52