]>
Commit | Line | Data |
---|---|---|
1 | <html> | |
2 | <head> | |
3 | <title>BOOST_PP_SEQ_FILTER_S</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_SEQ_FILTER_S</b> macro filters a <i>seq</i> according to a | |
9 | supplied criterion. It reenters <b>BOOST_PP_SEQ_FOLD_LEFT</b> with | |
10 | maximum efficiency. | |
11 | </div> | |
12 | <h4> | |
13 | Usage | |
14 | </h4> | |
15 | <div class="code"> | |
16 | <b>BOOST_PP_SEQ_FILTER_S</b>(<i>s</i>, <i>pred</i>, <i>data</i>, <i>seq</i>) | |
17 | </div> | |
18 | <h4> | |
19 | Arguments | |
20 | </h4> | |
21 | <dl> | |
22 | <dt>s</dt> | |
23 | <dd> | |
24 | The next available <b>BOOST_PP_SEQ_FOLD_LEFT</b> fold step. | |
25 | </dd> | |
26 | <dt>pred</dt> | |
27 | <dd> | |
28 | A ternary predicate of the form <i>pred</i>(<i>s</i>, <i>data</i>, <i>elem</i>). | |
29 | This predicate is expanded by <b>BOOST_PP_SEQ_FILTER</b> for each element in <i>seq</i> | |
30 | with the next available <b>BOOST_PP_SEQ_FOLD_LEFT</b> fold step, the auxiliary <i>data</i>, | |
31 | and the current element in <i>seq</i>. This macro must return a integral | |
32 | value in the range of <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>. If this | |
33 | predicate expands to non-zero for a certain element, that element is included | |
34 | in the resulting <i>seq</i>. | |
35 | </dd> | |
36 | <dt>data</dt> | |
37 | <dd> | |
38 | Auxiliary data passed to <i>pred</i>. | |
39 | </dd> | |
40 | <dt>seq</dt> | |
41 | <dd> | |
42 | The <i>seq</i> to be filtered. | |
43 | </dd> | |
44 | </dl> | |
45 | <h4> | |
46 | Remarks | |
47 | </h4> | |
48 | <div> | |
49 | This macro expands <i>pred</i> for each element in <i>seq</i>. It builds | |
50 | a new <i>seq</i> out of each element for which <i>pred</i> returns non-zero. | |
51 | </div> | |
52 | <h4> | |
53 | See Also | |
54 | </h4> | |
55 | <ul> | |
56 | <li> | |
57 | <a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li> | |
58 | <li> | |
59 | <a href="seq_filter.html">BOOST_PP_SEQ_FILTER</a></li> | |
60 | </ul> | |
61 | <h4> | |
62 | Requirements | |
63 | </h4> | |
64 | <div> | |
65 | <b>Header:</b> <a href="../headers/seq/filter.html"><boost/preprocessor/seq/filter.hpp></a> | |
66 | </div> | |
67 | <hr size="1"> | |
68 | <div style="margin-left: 0px;"> | |
69 |