2 // Copyright Aleksey Gurtovoy 2000-2004
\r
4 // Distributed under the Boost Software License, Version 1.0.
\r
5 // (See accompanying file LICENSE_1_0.txt or copy at
\r
6 // http://www.boost.org/LICENSE_1_0.txt)
\r
9 // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
\r
10 // -- DO NOT modify by hand!
\r
12 namespace boost { namespace mpl { namespace aux {
\r
14 /// forward declaration
\r
21 , typename ForwardOp
\r
23 struct iter_fold_impl;
\r
26 struct iter_fold_chunk;
\r
28 template<> struct iter_fold_chunk<0>
\r
34 , typename ForwardOp
\r
38 typedef First iter0;
\r
39 typedef State state0;
\r
40 typedef state0 state;
\r
41 typedef iter0 iterator;
\r
45 template<> struct result_< int,int,int,int >
\r
48 typedef int iterator;
\r
53 template<> struct iter_fold_chunk<1>
\r
59 , typename ForwardOp
\r
63 typedef First iter0;
\r
64 typedef State state0;
\r
65 typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
\r
66 typedef typename mpl::next<iter0>::type iter1;
\r
69 typedef state1 state;
\r
70 typedef iter1 iterator;
\r
74 template<> struct result_< int,int,int,int >
\r
77 typedef int iterator;
\r
82 template<> struct iter_fold_chunk<2>
\r
88 , typename ForwardOp
\r
92 typedef First iter0;
\r
93 typedef State state0;
\r
94 typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
\r
95 typedef typename mpl::next<iter0>::type iter1;
\r
96 typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
\r
97 typedef typename mpl::next<iter1>::type iter2;
\r
100 typedef state2 state;
\r
101 typedef iter2 iterator;
\r
105 template<> struct result_< int,int,int,int >
\r
108 typedef int iterator;
\r
113 template<> struct iter_fold_chunk<3>
\r
119 , typename ForwardOp
\r
123 typedef First iter0;
\r
124 typedef State state0;
\r
125 typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
\r
126 typedef typename mpl::next<iter0>::type iter1;
\r
127 typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
\r
128 typedef typename mpl::next<iter1>::type iter2;
\r
129 typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
\r
130 typedef typename mpl::next<iter2>::type iter3;
\r
133 typedef state3 state;
\r
134 typedef iter3 iterator;
\r
138 template<> struct result_< int,int,int,int >
\r
141 typedef int iterator;
\r
146 template<> struct iter_fold_chunk<4>
\r
152 , typename ForwardOp
\r
156 typedef First iter0;
\r
157 typedef State state0;
\r
158 typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
\r
159 typedef typename mpl::next<iter0>::type iter1;
\r
160 typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
\r
161 typedef typename mpl::next<iter1>::type iter2;
\r
162 typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
\r
163 typedef typename mpl::next<iter2>::type iter3;
\r
164 typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
\r
165 typedef typename mpl::next<iter3>::type iter4;
\r
168 typedef state4 state;
\r
169 typedef iter4 iterator;
\r
173 template<> struct result_< int,int,int,int >
\r
176 typedef int iterator;
\r
182 struct iter_fold_chunk
\r
188 , typename ForwardOp
\r
192 typedef iter_fold_impl<
\r
200 typedef iter_fold_impl<
\r
201 ( (N - 4) < 0 ? 0 : N - 4 )
\r
202 , typename chunk_::iterator
\r
204 , typename chunk_::state
\r
208 typedef typename res_::state state;
\r
209 typedef typename res_::iterator iterator;
\r
217 , typename ForwardOp
\r
219 struct iter_fold_step;
\r
225 struct iter_fold_null_step
\r
227 typedef Last iterator;
\r
228 typedef State state;
\r
232 struct iter_fold_chunk< -1 >
\r
238 , typename ForwardOp
\r
242 typedef typename if_<
\r
243 typename is_same< First,Last >::type
\r
244 , iter_fold_null_step< Last,State >
\r
245 , iter_fold_step< First,Last,State,ForwardOp >
\r
248 typedef typename res_::state state;
\r
249 typedef typename res_::iterator iterator;
\r
253 template<> struct result_< int,int,int,int >
\r
256 typedef int iterator;
\r
265 , typename ForwardOp
\r
267 struct iter_fold_step
\r
269 typedef iter_fold_chunk< -1 >::template result_<
\r
270 typename mpl::next<First>::type
\r
272 , typename apply2< ForwardOp,State,First >::type
\r
276 typedef typename chunk_::state state;
\r
277 typedef typename chunk_::iterator iterator;
\r
285 , typename ForwardOp
\r
287 struct iter_fold_impl
\r
288 : iter_fold_chunk<N>
\r
289 ::template result_< First,Last,State,ForwardOp >
\r