]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <html> |
2 | <head> | |
3 | <title>BOOST_PP_LIST_REVERSE_D</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_REVERSE_D</b> macro expands to the reverse a <i>list</i>. | |
9 | It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency. | |
10 | </div> | |
11 | <h4>Usage</h4> | |
12 | <div class="code"> | |
13 | <b>BOOST_PP_LIST_REVERSE_D</b>(<i>d</i>, <i>list</i>) | |
14 | </div> | |
15 | <h4>Arguments</h4> | |
16 | <dl> | |
17 | <dt>d</dt> | |
18 | <dd> | |
19 | The next available <b>BOOST_PP_WHILE</b> iteration. | |
20 | </dd> | |
21 | <dt>list</dt> | |
22 | <dd> | |
23 | A <i>list</i> to be reversed. | |
24 | </dd> | |
25 | </dl> | |
26 | <h4>See Also</h4> | |
27 | <ul> | |
28 | <li><a href="list_reverse.html">BOOST_PP_LIST_REVERSE</a></li> | |
29 | </ul> | |
30 | <h4>Requirements</h4> | |
31 | <div> | |
32 | <b>Header:</b> <a href="../headers/list/reverse.html"><boost/preprocessor/list/reverse.hpp></a> | |
33 | </div> | |
34 | <h4>Sample Code</h4> | |
35 | <div><pre> | |
36 | #include <<a href="../headers/list/fold_right.html">boost/preprocessor/list/fold_right.hpp</a>> | |
37 | #include <<a href="../headers/list/reverse.html">boost/preprocessor/list/reverse.hpp</a>> | |
38 | ||
39 | #define L1 (a, (b, (c, (d, <a href="nil.html">BOOST_PP_NIL</a>)))) | |
40 | #define L2 (L1, (L1, (L1, <a href="nil.html">BOOST_PP_NIL</a>))) | |
41 | ||
42 | #define OP(d, state, x) (<a href="list_reverse_d.html">BOOST_PP_LIST_REVERSE_D</a>(d, x), state) | |
43 | ||
44 | <a href="list_fold_right.html">BOOST_PP_LIST_FOLD_RIGHT</a>(OP, <a href="nil.html">BOOST_PP_NIL</a>, L2) | |
45 | /* | |
46 | expands to... | |
47 | ((d, (c, (b, (a, <a href="nil.html">BOOST_PP_NIL</a>)))), ((d, (c, (b, (a, <a href="nil.html">BOOST_PP_NIL</a>)))), | |
48 | ((d, (c, (b, (a, <a href="nil.html">BOOST_PP_NIL</a>)))), <a href="nil.html">BOOST_PP_NIL</a>))) | |
49 | */ | |
50 | </pre></div> | |
51 | <hr size="1"> | |
52 | <div style="margin-left: 0px;"> | |
53 |