1 .. Algorithms/Transformation Algorithms//reverse_copy_if |120
14 , typename In = |unspecified|
16 struct reverse_copy_if
18 typedef |unspecified| type;
26 Returns a reversed, filtered copy of the original sequence containing the
27 elements that satisfy the predicate ``Pred``.
29 |transformation algorithm disclaimer|
36 #include <boost/mpl/copy_if.hpp>
42 |Reversible Algorithm|
48 +---------------+-----------------------------------+-------------------------------+
49 | Parameter | Requirement | Description |
50 +===============+===================================+===============================+
51 | ``Sequence`` | |Forward Sequence| | A sequence to copy. |
52 +---------------+-----------------------------------+-------------------------------+
53 | ``Pred`` | Unary |Lambda Expression| | A copying condition. |
54 +---------------+-----------------------------------+-------------------------------+
55 | ``In`` | |Inserter| | An inserter. |
56 +---------------+-----------------------------------+-------------------------------+
62 |Semantics disclaimer...| |Reversible Algorithm|.
64 For any |Forward Sequence| ``s``, an unary |Lambda Expression| ``pred``, and
70 typedef reverse_copy_if<s,pred,in>::type r;
81 typedef lambda<pred>::type p;
82 typedef lambda<in::operation>::type op;
88 apply_wrap\ ``1``\<p,_2>
89 , apply_wrap\ ``2``\<op,_1,_2>
98 Linear. Exactly ``size<s>::value`` applications of ``pred``, and at
99 most ``size<s>::value`` applications of ``in::operation``.
107 typedef reverse_copy_if<
109 , less< _1, int_<5> >
110 , front_inserter< vector<> >
113 BOOST_MPL_ASSERT_RELATION( size<result>::value, ==, 5 );
114 BOOST_MPL_ASSERT(( equal<result,range_c<int,0,5> > ));
120 |Transformation Algorithms|, |Reversible Algorithm|, |copy_if|, |reverse_copy|, |remove_if|, |replace_if|
123 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
124 Distributed under the Boost Software License, Version 1.0. (See accompanying
125 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)