The BOOST_PP_SET_FILTER_S macro filters a set according to a supplied criterion.  It reenters BOOST_PP_SET_FOLD_LEFT with maximum efficiency.

Usage

BOOST_PP_SET_FILTER_S(s, pred, data, set)

Arguments

s
The next available BOOST_PP_SET_FOLD_LEFT fold step.
pred
A ternary predicate of the form pred(s, data, elem).  This predicate is expanded by BOOST_PP_SET_FILTER for each element in set with the next available BOOST_PP_SET_FOLD_LEFT fold step, the auxiliary data, and the current element in set.  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 set.
data
Auxiliary data passed to pred.
set
The set to be filtered.

Remarks

This macro expands pred for each element in set.  It builds a new set out of each element for which pred returns non-zero.

See Also

Requirements

Header:  <boost/preprocessor/set/filter.hpp>