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
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) $
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
{
34 , typename In1
= typename if_na
<In
,In2
>::type
36 struct stable_partition_impl
39 , pair
< typename
In1::state
, typename
In2::state
>
40 , protect
< partition_op
<
42 , typename
In1::operation
43 , typename
In2::operation
54 , typename In1
= typename if_na
<In
,In2
>::type
56 struct reverse_stable_partition_impl
59 , pair
< typename
In1::state
, typename
In2::state
>
60 , protect
< partition_op
<
62 , typename
In1::operation
63 , typename
In2::operation
71 BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, stable_partition
)
75 #endif // BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED