]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/include/boost/mpl/stable_partition.hpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
bf0a4af99146a71139993a8fe97410bfb43057d8
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / mpl / stable_partition.hpp
1 \r
2 #ifndef BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED\r
3 #define BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED\r
4 \r
5 // Copyright Eric Friedman 2002-2003\r
6 // Copyright Aleksey Gurtovoy 2004\r
7 //\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
11 //\r
12 // See http://www.boost.org/libs/mpl for documentation.\r
13 \r
14 // $Id: stable_partition.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
17 \r
18 #include <boost/mpl/fold.hpp>\r
19 #include <boost/mpl/reverse_fold.hpp>\r
20 #include <boost/mpl/protect.hpp>\r
21 #include <boost/mpl/aux_/partition_op.hpp>\r
22 #include <boost/mpl/aux_/inserter_algorithm.hpp>\r
23 #include <boost/mpl/aux_/na.hpp>\r
24 \r
25 namespace boost { namespace mpl {\r
26 \r
27 namespace aux {\r
28  \r
29 template <\r
30       typename Sequence\r
31     , typename Pred\r
32     , typename In\r
33     , typename In2\r
34     , typename In1 = typename if_na<In,In2>::type\r
35     >\r
36 struct stable_partition_impl\r
37     : fold<\r
38           Sequence\r
39         , pair< typename In1::state, typename In2::state >\r
40         , protect< partition_op< \r
41               Pred\r
42             , typename In1::operation\r
43             , typename In2::operation\r
44             > >\r
45         >\r
46 {\r
47 };\r
48 \r
49 template <\r
50       typename Sequence\r
51     , typename Pred\r
52     , typename In\r
53     , typename In2\r
54     , typename In1 = typename if_na<In,In2>::type\r
55     >\r
56 struct reverse_stable_partition_impl\r
57     : reverse_fold<\r
58           Sequence\r
59         , pair< typename In1::state, typename In2::state >\r
60         , protect< partition_op< \r
61               Pred\r
62             , typename In1::operation\r
63             , typename In2::operation\r
64             > >\r
65         >\r
66 {\r
67 };\r
68 \r
69 } // namespace aux\r
70 \r
71 BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, stable_partition)\r
72 \r
73 }}\r
74 \r
75 #endif // BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED\r