The BOOST_PP_SEQ_FILTER macro filters a seq according to a
supplied criterion.
Usage
BOOST_PP_SEQ_FILTER(pred, data, seq)
Arguments
- pred
-
A ternary predicate of the form pred(s, data, elem).
This predicate is expanded by BOOST_PP_SEQ_FILTER for each element in seq
with the next available BOOST_PP_SEQ_FOLD_LEFT fold step, the auxiliary data,
and the current element in seq. This macro must return a integral
value in the range of 0 to BOOST_PP_LIMIT_MAG. If this
predicate expands to non-zero for a certain element, that element is included
in the resulting seq.
- data
-
Auxiliary data passed to pred.
- seq
-
The seq to be filtered.
Remarks
This macro expands pred for each element in seq. It builds
a new seq out of each element for which pred returns non-zero.
For maximum efficiency, use BOOST_PP_SEQ_FILTER_S.
See Also
Requirements
Sample Code