Pack required boost code together.
[xy_vsfilter.git] / src / thirdparty / boost_1_47_0 / boost / mpl / stable_partition.hpp
blobbf0a4af99146a71139993a8fe97410bfb43057d8
2 #ifndef BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED
3 #define BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED
5 // Copyright Eric Friedman 2002-2003
6 // Copyright Aleksey Gurtovoy 2004
7 //
8 // Distributed under the Boost Software License, Version 1.0.
9 // (See accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
12 // See http://www.boost.org/libs/mpl for documentation.
14 // $Id: stable_partition.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
15 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
16 // $Revision: 49267 $
18 #include <boost/mpl/fold.hpp>
19 #include <boost/mpl/reverse_fold.hpp>
20 #include <boost/mpl/protect.hpp>
21 #include <boost/mpl/aux_/partition_op.hpp>
22 #include <boost/mpl/aux_/inserter_algorithm.hpp>
23 #include <boost/mpl/aux_/na.hpp>
25 namespace boost { namespace mpl {
27 namespace aux {
29 template <
30 typename Sequence
31 , typename Pred
32 , typename In
33 , typename In2
34 , typename In1 = typename if_na<In,In2>::type
36 struct stable_partition_impl
37 : fold<
38 Sequence
39 , pair< typename In1::state, typename In2::state >
40 , protect< partition_op<
41 Pred
42 , typename In1::operation
43 , typename In2::operation
44 > >
49 template <
50 typename Sequence
51 , typename Pred
52 , typename In
53 , typename In2
54 , typename In1 = typename if_na<In,In2>::type
56 struct reverse_stable_partition_impl
57 : reverse_fold<
58 Sequence
59 , pair< typename In1::state, typename In2::state >
60 , protect< partition_op<
61 Pred
62 , typename In1::operation
63 , typename In2::operation
64 > >
69 } // namespace aux
71 BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, stable_partition)
75 #endif // BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED