Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/mpl/stable_partition.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children | c530137014c0 |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 | |
2 #ifndef BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED | |
3 #define BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED | |
4 | |
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) | |
11 // | |
12 // See http://www.boost.org/libs/mpl for documentation. | |
13 | |
14 // $Id: stable_partition.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ | |
15 // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ | |
16 // $Revision: 49267 $ | |
17 | |
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> | |
24 | |
25 namespace boost { namespace mpl { | |
26 | |
27 namespace aux { | |
28 | |
29 template < | |
30 typename Sequence | |
31 , typename Pred | |
32 , typename In | |
33 , typename In2 | |
34 , typename In1 = typename if_na<In,In2>::type | |
35 > | |
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 > > | |
45 > | |
46 { | |
47 }; | |
48 | |
49 template < | |
50 typename Sequence | |
51 , typename Pred | |
52 , typename In | |
53 , typename In2 | |
54 , typename In1 = typename if_na<In,In2>::type | |
55 > | |
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 > > | |
65 > | |
66 { | |
67 }; | |
68 | |
69 } // namespace aux | |
70 | |
71 BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, stable_partition) | |
72 | |
73 }} | |
74 | |
75 #endif // BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED |