File indexing completed on 2025-01-18 09:41:38
0001
0002 #ifndef BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED
0003 #define BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include <boost/mpl/apply.hpp>
0019 #include <boost/mpl/eval_if.hpp>
0020 #include <boost/mpl/if.hpp>
0021 #include <boost/mpl/pair.hpp>
0022 #include <boost/mpl/aux_/lambda_spec.hpp>
0023
0024 namespace boost { namespace mpl {
0025
0026 namespace aux {
0027
0028 template< typename Pred, typename In1Op, typename In2Op >
0029 struct partition_op
0030 {
0031 template< typename State, typename T >
0032 struct apply
0033 {
0034 typedef typename State::first first_;
0035 typedef typename State::second second_;
0036 typedef typename apply1< Pred,T >::type pred_;
0037
0038 typedef typename eval_if<
0039 pred_
0040 , apply2<In1Op,first_,T>
0041 , apply2<In2Op,second_,T>
0042 >::type result_;
0043
0044 typedef typename if_<
0045 pred_
0046 , pair< result_,second_ >
0047 , pair< first_,result_ >
0048 >::type type;
0049 };
0050 };
0051
0052 }
0053
0054 BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::partition_op)
0055
0056 }}
0057
0058 #endif