1 .. Algorithms/Transformation Algorithms//reverse_remove_if |170
14 , typename In = |unspecified|
16 struct reverse_remove_if
18 typedef |unspecified| type;
25 Returns a new sequence that contains all the elements from |begin/end<Sequence>| range
26 in reverse order except those that satisfy the predicate ``Pred``.
28 |transformation algorithm disclaimer|
35 #include <boost/mpl/remove_if.hpp>
41 |Reversible Algorithm|
47 +---------------+-----------------------------------+-------------------------------+
48 | Parameter | Requirement | Description |
49 +===============+===================================+===============================+
50 | ``Sequence`` | |Forward Sequence| | An original sequence. |
51 +---------------+-----------------------------------+-------------------------------+
52 | ``Pred`` | Unary |Lambda Expression| | A removal condition. |
53 +---------------+-----------------------------------+-------------------------------+
54 | ``In`` | |Inserter| | An inserter. |
55 +---------------+-----------------------------------+-------------------------------+
61 |Semantics disclaimer...| |Reversible Algorithm|.
63 For any |Forward Sequence| ``s``, and an |Inserter| ``in``, and an unary
64 |Lambda Expression| ``pred``:
69 typedef reverse_remove_if<s,pred,in>::type r;
79 typedef lambda<pred>::type p;
80 typedef lambda<in::operation>::type op;
86 apply_wrap\ ``1``\<p,_2>
88 , apply_wrap\ ``2``\<op,_1,_2>
96 Linear. Performs exactly ``size<s>::value`` applications of ``pred``, and at
97 most ``size<s>::value`` insertions.
105 typedef vector_c<int,1,4,5,2,7,5,3,5>::type numbers;
106 typedef reverse_remove_if< numbers, greater<_,int_<4> > >::type result;
108 BOOST_MPL_ASSERT(( equal< result,vector_c<int,3,2,4,1>,equal_to<_,_> > ));
114 |Transformation Algorithms|, |Reversible Algorithm|, |remove_if|, |reverse_remove|,
115 |reverse_copy_if|, |replace_if|
118 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
119 Distributed under the Boost Software License, Version 1.0. (See accompanying
120 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)