2 // Copyright Aleksey Gurtovoy 2000-2004
4 // Distributed under the Boost Software License, Version 1.0.
5 // (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
9 // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
10 // -- DO NOT modify by hand!
12 namespace boost { namespace mpl { namespace aux {
14 /// forward declaration
23 struct iter_fold_impl;
26 struct iter_fold_chunk;
28 template<> struct iter_fold_chunk<0>
41 typedef iter0 iterator;
45 template<> struct iter_fold_chunk<1>
57 typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
58 typedef typename mpl::next<iter0>::type iter1;
62 typedef iter1 iterator;
66 template<> struct iter_fold_chunk<2>
78 typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
79 typedef typename mpl::next<iter0>::type iter1;
80 typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
81 typedef typename mpl::next<iter1>::type iter2;
85 typedef iter2 iterator;
89 template<> struct iter_fold_chunk<3>
100 typedef State state0;
101 typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
102 typedef typename mpl::next<iter0>::type iter1;
103 typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
104 typedef typename mpl::next<iter1>::type iter2;
105 typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
106 typedef typename mpl::next<iter2>::type iter3;
109 typedef state3 state;
110 typedef iter3 iterator;
114 template<> struct iter_fold_chunk<4>
125 typedef State state0;
126 typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
127 typedef typename mpl::next<iter0>::type iter1;
128 typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
129 typedef typename mpl::next<iter1>::type iter2;
130 typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
131 typedef typename mpl::next<iter2>::type iter3;
132 typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
133 typedef typename mpl::next<iter3>::type iter4;
136 typedef state4 state;
137 typedef iter4 iterator;
142 struct iter_fold_chunk
152 typedef iter_fold_impl<
160 typedef iter_fold_impl<
161 ( (N - 4) < 0 ? 0 : N - 4 )
162 , typename chunk_::iterator
164 , typename chunk_::state
168 typedef typename res_::state state;
169 typedef typename res_::iterator iterator;
179 struct iter_fold_step;
185 struct iter_fold_null_step
187 typedef Last iterator;
192 struct iter_fold_chunk< -1 >
202 typedef typename if_<
203 typename is_same< First,Last >::type
204 , iter_fold_null_step< Last,State >
205 , iter_fold_step< First,Last,State,ForwardOp >
208 typedef typename res_::state state;
209 typedef typename res_::iterator iterator;
219 struct iter_fold_step
221 typedef iter_fold_chunk< -1 >::template result_<
222 typename mpl::next<First>::type
224 , typename apply2< ForwardOp,State,First >::type
228 typedef typename chunk_::state state;
229 typedef typename chunk_::iterator iterator;
239 struct iter_fold_impl
241 ::template result_< First,Last,State,ForwardOp >