os/ossrv/ossrv_pub/boost_apis/boost/mpl/stable_partition.hpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/mpl/stable_partition.hpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,75 @@
     1.4 +
     1.5 +#ifndef BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED
     1.6 +#define BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED
     1.7 +
     1.8 +// Copyright Eric Friedman 2002-2003
     1.9 +// Copyright Aleksey Gurtovoy 2004
    1.10 +//
    1.11 +// Distributed under the Boost Software License, Version 1.0. 
    1.12 +// (See accompanying file LICENSE_1_0.txt or copy at 
    1.13 +// http://www.boost.org/LICENSE_1_0.txt)
    1.14 +//
    1.15 +// See http://www.boost.org/libs/mpl for documentation.
    1.16 +
    1.17 +// $Source: /cvsroot/boost/boost/boost/mpl/stable_partition.hpp,v $
    1.18 +// $Date: 2004/11/28 01:58:27 $
    1.19 +// $Revision: 1.4 $
    1.20 +
    1.21 +#include <boost/mpl/fold.hpp>
    1.22 +#include <boost/mpl/reverse_fold.hpp>
    1.23 +#include <boost/mpl/protect.hpp>
    1.24 +#include <boost/mpl/aux_/partition_op.hpp>
    1.25 +#include <boost/mpl/aux_/inserter_algorithm.hpp>
    1.26 +#include <boost/mpl/aux_/na.hpp>
    1.27 +
    1.28 +namespace boost { namespace mpl {
    1.29 +
    1.30 +namespace aux {
    1.31 + 
    1.32 +template <
    1.33 +      typename Sequence
    1.34 +    , typename Pred
    1.35 +    , typename In
    1.36 +    , typename In2
    1.37 +    , typename In1 = typename if_na<In,In2>::type
    1.38 +    >
    1.39 +struct stable_partition_impl
    1.40 +    : fold<
    1.41 +          Sequence
    1.42 +        , pair< typename In1::state, typename In2::state >
    1.43 +        , protect< partition_op< 
    1.44 +              Pred
    1.45 +            , typename In1::operation
    1.46 +            , typename In2::operation
    1.47 +            > >
    1.48 +        >
    1.49 +{
    1.50 +};
    1.51 +
    1.52 +template <
    1.53 +      typename Sequence
    1.54 +    , typename Pred
    1.55 +    , typename In
    1.56 +    , typename In2
    1.57 +    , typename In1 = typename if_na<In,In2>::type
    1.58 +    >
    1.59 +struct reverse_stable_partition_impl
    1.60 +    : reverse_fold<
    1.61 +          Sequence
    1.62 +        , pair< typename In1::state, typename In2::state >
    1.63 +        , protect< partition_op< 
    1.64 +              Pred
    1.65 +            , typename In1::operation
    1.66 +            , typename In2::operation
    1.67 +            > >
    1.68 +        >
    1.69 +{
    1.70 +};
    1.71 +
    1.72 +} // namespace aux
    1.73 +
    1.74 +BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, stable_partition)
    1.75 +
    1.76 +}}
    1.77 +
    1.78 +#endif // BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED