2 #ifndef BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED
\r
3 #define BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED
\r
5 // Copyright Eric Friedman 2003
\r
6 // Copyright Aleksey Gurtovoy 2004
\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
12 // See http://www.boost.org/libs/mpl for documentation.
\r
14 // $Id: partition_op.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
18 #include <boost/mpl/apply.hpp>
\r
19 #include <boost/mpl/eval_if.hpp>
\r
20 #include <boost/mpl/if.hpp>
\r
21 #include <boost/mpl/pair.hpp>
\r
22 #include <boost/mpl/aux_/lambda_spec.hpp>
\r
24 namespace boost { namespace mpl {
\r
28 template< typename Pred, typename In1Op, typename In2Op >
\r
31 template< typename State, typename T >
\r
34 typedef typename State::first first_;
\r
35 typedef typename State::second second_;
\r
36 typedef typename apply1< Pred,T >::type pred_;
\r
38 typedef typename eval_if<
\r
40 , apply2<In1Op,first_,T>
\r
41 , apply2<In2Op,second_,T>
\r
44 typedef typename if_<
\r
46 , pair< result_,second_ >
\r
47 , pair< first_,result_ >
\r
54 BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::partition_op)
\r
58 #endif // BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED
\r