1 .. Algorithms/Transformation Algorithms//remove_if |70
14 , typename In = |unspecified|
18 typedef |unspecified| type;
25 Returns a new sequence that contains all the elements from |begin/end<Sequence>| range
26 except those that satisfy the predicate ``Pred``.
28 .. Returns a copy of the original sequence with all elements satisfying the predicate
31 |transformation algorithm disclaimer|
38 #include <boost/mpl/remove_if.hpp>
44 |Reversible Algorithm|
50 +---------------+-----------------------------------+-------------------------------+
51 | Parameter | Requirement | Description |
52 +===============+===================================+===============================+
53 | ``Sequence`` | |Forward Sequence| | An original sequence. |
54 +---------------+-----------------------------------+-------------------------------+
55 | ``Pred`` | Unary |Lambda Expression| | A removal condition. |
56 +---------------+-----------------------------------+-------------------------------+
57 | ``In`` | |Inserter| | An inserter. |
58 +---------------+-----------------------------------+-------------------------------+
64 |Semantics disclaimer...| |Reversible Algorithm|.
66 For any |Forward Sequence| ``s``, and an |Inserter| ``in``, and an unary
67 |Lambda Expression| ``pred``:
72 typedef remove_if<s,pred,in>::type r;
82 typedef lambda<pred>::type p;
83 typedef lambda<in::operation>::type op;
89 apply_wrap\ ``1``\<p,_2>
91 , apply_wrap\ ``2``\<op,_1,_2>
99 Linear. Performs exactly ``size<s>::value`` applications of ``pred``, and at
100 most ``size<s>::value`` insertions.
108 typedef vector_c<int,1,4,5,2,7,5,3,5>::type numbers;
109 typedef remove_if< numbers, greater<_,int_<4> > >::type result;
111 BOOST_MPL_ASSERT(( equal< result,vector_c<int,1,4,2,3>,equal_to<_,_> > ));
117 |Transformation Algorithms|, |Reversible Algorithm|, |reverse_remove_if|, |remove|, |copy_if|, |replace_if|
120 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
121 Distributed under the Boost Software License, Version 1.0. (See accompanying
122 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)