2 #ifndef BOOST_MPL_COPY_IF_HPP_INCLUDED
\r
3 #define BOOST_MPL_COPY_IF_HPP_INCLUDED
\r
5 // Copyright Aleksey Gurtovoy 2000-2004
\r
6 // Copyright David Abrahams 2003-2004
\r
8 // Distributed under the Boost Software License, Version 1.0.
\r
9 // (See accompanying file LICENSE_1_0.txt or copy at
\r
10 // http://www.boost.org/LICENSE_1_0.txt)
\r
12 // See http://www.boost.org/libs/mpl for documentation.
\r
14 // $Id: copy_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
\r
15 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
\r
16 // $Revision: 49267 $
\r
18 #include <boost/mpl/fold.hpp>
\r
19 #include <boost/mpl/reverse_fold.hpp>
\r
20 #include <boost/mpl/apply.hpp>
\r
21 #include <boost/mpl/eval_if.hpp>
\r
22 #include <boost/mpl/identity.hpp>
\r
23 #include <boost/mpl/protect.hpp>
\r
24 #include <boost/mpl/aux_/inserter_algorithm.hpp>
\r
25 #include <boost/mpl/aux_/config/forwarding.hpp>
\r
27 namespace boost { namespace mpl {
\r
33 , typename Predicate
\r
37 template< typename Sequence, typename T > struct apply
\r
38 #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
\r
40 typename apply1<Predicate,T>::type
\r
41 , apply2<Operation,Sequence,T>
\r
42 , identity<Sequence>
\r
47 typedef typename eval_if<
\r
48 typename apply1<Predicate,T>::type
\r
49 , apply2<Operation,Sequence,T>
\r
50 , identity<Sequence>
\r
58 , typename Predicate
\r
64 , typename Inserter::state
\r
65 , protect< aux::copy_if_op<
\r
66 typename Inserter::operation
\r
75 , typename Predicate
\r
78 struct reverse_copy_if_impl
\r
81 , typename Inserter::state
\r
82 , protect< aux::copy_if_op<
\r
83 typename Inserter::operation
\r
92 BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, copy_if)
\r
96 #endif // BOOST_MPL_COPY_IF_HPP_INCLUDED
\r