![]() |
Home | Libraries | People | FAQ | More |
Returns a new sequence, containing all the elements of the original except
those where a given unary function object evaluates to true.
template<
typename Pred,
typename Sequence
>
typename result_of::remove_if<Sequence const, Pred>::type remove_if(Sequence const& seq);
Table 1.73. Parameters
|
Parameter |
Requirement |
Description |
|---|---|---|
|
|
A model of Forward Sequence |
Operation's argument |
|
|
A model of unary MPL Lambda Expression |
Removal predicate |
remove_if<Pred>(seq);
Return type:
seq
implements the Associative
Sequence model.
Semantics: Returns a new sequence, containing
all the elements of seq,
in their original order, except those elements with types for which
Pred evaluates to boost::mpl::true_. Equivalent to .
filter<boost::mpl::not_<Pred>
>(seq)
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/remove_if.hpp> #include <boost/fusion/include/remove_if.hpp>
constvector<int,double> vec(1,2.0); assert(remove_if<is_floating_point<mpl::_> >(vec) ==make_vector(1));