4 #if !defined(BOOST_PP_IS_ITERATING)
31 # define AUX778076_ITER_FOLD_FORWARD_STEP(unused, n_, unused2) \
32 typedef typename apply2< \
34 , BOOST_PP_CAT(fwd_state,n_) \
35 , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,n_)) \
36 >::type BOOST_PP_CAT(fwd_state,BOOST_PP_INC(n_)); \
37 typedef typename mpl::next<BOOST_PP_CAT(iter,n_)>::type \
38 BOOST_PP_CAT(iter,BOOST_PP_INC(n_)); \
41 # define AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC(n_) \
42 typedef typename apply2< \
44 , BOOST_PP_CAT(bkwd_state,n_) \
45 , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,BOOST_PP_DEC(n_))) \
46 >::type BOOST_PP_CAT(bkwd_state,BOOST_PP_DEC(n_)); \
49 # define AUX778076_ITER_FOLD_BACKWARD_STEP(unused, n_, j) \
50 AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC( \
51 BOOST_PP_SUB_D(1,j,n_) \
55 # define AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(n_) \
56 typedef typename nested_chunk::state BOOST_PP_CAT(bkwd_state,n_);
59 # define AUX778076_FOLD_IMPL_NAME \
60 BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_impl) \
63 # define AUX778076_FOLD_CHUNK_NAME \
64 BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_chunk) \
67 namespace boost {
namespace mpl {
namespace aux {
80 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
81 && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
83 # define BOOST_PP_ITERATION_PARAMS_1 \
84 (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/reverse_fold_impl_body.hpp>))
85 # include BOOST_PP_ITERATE()
124 typedef bkwd_state0
state;
133 ,
typename BackwardOp
142 ,
typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>
::type
150 , AUX778076_FOLD_IMPL_OP(First)
159 ,
typename BackwardOp
168 #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
170 template< BOOST_MPL_AUX_NTTP_DECL(
long, N) >
173 # define BOOST_PP_ITERATION_PARAMS_1 \
174 (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/reverse_fold_impl_body.hpp>))
175 # include BOOST_PP_ITERATE()
178 template< BOOST_MPL_AUX_NTTP_DECL(
long, N) >
185 ,
typename BackwardOp
191 typedef State fwd_state0;
216 typedef bkwd_state0 state;
217 typedef typename nested_chunk::iterator iterator;
226 ,
typename BackwardOp
229 struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step);
235 struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)
237 typedef Last iterator;
248 ,
typename BackwardOp
253 typedef typename if_<
255 ,
BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)<Last,State>
256 ,
BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)<First,Last,State,BackwardOp,ForwardOp>
259 typedef typename res_::state state;
260 typedef typename res_::iterator iterator;
263 #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
264 template<>
struct result_<int,int,int,int,int>
268 typedef int iterator;
277 ,
typename BackwardOp
280 struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)
285 ,
typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type
290 typedef typename apply2<
292 ,
typename nested_step::state
293 , AUX778076_FOLD_IMPL_OP(First)
296 typedef typename nested_step::iterator iterator;
304 ,
typename BackwardOp
309 ::template result_<First,Last,State,BackwardOp,ForwardOp>
313 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
317 # undef AUX778076_FIRST_BACKWARD_STATE_TYPEDEF
318 # undef AUX778076_ITER_FOLD_BACKWARD_STEP
319 # undef AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC
320 # undef AUX778076_ITER_FOLD_FORWARD_STEP
322 #undef AUX778076_FOLD_IMPL_OP
323 #undef AUX778076_FOLD_IMPL_NAME_PREFIX
329 # define n_ BOOST_PP_FRAME_ITERATION(1)
331 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
332 && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
338 ,
typename BackwardOp
344 typedef State fwd_state0;
360 typedef bkwd_state0 state;
372 ,
typename BackwardOp
378 typedef State fwd_state0;
394 typedef bkwd_state0 state;
398 #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
399 template<>
struct result_<int,int,int,int,int>
403 typedef int iterator;
408 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
412 #endif // BOOST_PP_IS_ITERATING