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_/reverse_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 BackwardOp
\r
22 , typename ForwardOp
\r
24 struct reverse_iter_fold_impl;
\r
27 struct reverse_iter_fold_chunk;
\r
29 template<> struct reverse_iter_fold_chunk<0>
\r
35 , typename BackwardOp
\r
36 , typename ForwardOp
\r
40 typedef First iter0;
\r
41 typedef State fwd_state0;
\r
42 typedef fwd_state0 bkwd_state0;
\r
43 typedef bkwd_state0 state;
\r
44 typedef iter0 iterator;
\r
48 template<> struct result_< int,int,int,int,int >
\r
51 typedef int iterator;
\r
56 template<> struct reverse_iter_fold_chunk<1>
\r
62 , typename BackwardOp
\r
63 , typename ForwardOp
\r
67 typedef First iter0;
\r
68 typedef State fwd_state0;
\r
69 typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
\r
70 typedef typename mpl::next<iter0>::type iter1;
\r
73 typedef fwd_state1 bkwd_state1;
\r
74 typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
\r
75 typedef bkwd_state0 state;
\r
76 typedef iter1 iterator;
\r
80 template<> struct result_< int,int,int,int,int >
\r
83 typedef int iterator;
\r
88 template<> struct reverse_iter_fold_chunk<2>
\r
94 , typename BackwardOp
\r
95 , typename ForwardOp
\r
99 typedef First iter0;
\r
100 typedef State fwd_state0;
\r
101 typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
\r
102 typedef typename mpl::next<iter0>::type iter1;
\r
103 typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
\r
104 typedef typename mpl::next<iter1>::type iter2;
\r
107 typedef fwd_state2 bkwd_state2;
\r
108 typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
\r
109 typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
\r
112 typedef bkwd_state0 state;
\r
113 typedef iter2 iterator;
\r
117 template<> struct result_< int,int,int,int,int >
\r
120 typedef int iterator;
\r
125 template<> struct reverse_iter_fold_chunk<3>
\r
131 , typename BackwardOp
\r
132 , typename ForwardOp
\r
136 typedef First iter0;
\r
137 typedef State fwd_state0;
\r
138 typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
\r
139 typedef typename mpl::next<iter0>::type iter1;
\r
140 typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
\r
141 typedef typename mpl::next<iter1>::type iter2;
\r
142 typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
\r
143 typedef typename mpl::next<iter2>::type iter3;
\r
146 typedef fwd_state3 bkwd_state3;
\r
147 typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
\r
148 typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
\r
149 typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
\r
152 typedef bkwd_state0 state;
\r
153 typedef iter3 iterator;
\r
157 template<> struct result_< int,int,int,int,int >
\r
160 typedef int iterator;
\r
165 template<> struct reverse_iter_fold_chunk<4>
\r
171 , typename BackwardOp
\r
172 , typename ForwardOp
\r
176 typedef First iter0;
\r
177 typedef State fwd_state0;
\r
178 typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
\r
179 typedef typename mpl::next<iter0>::type iter1;
\r
180 typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
\r
181 typedef typename mpl::next<iter1>::type iter2;
\r
182 typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
\r
183 typedef typename mpl::next<iter2>::type iter3;
\r
184 typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
\r
185 typedef typename mpl::next<iter3>::type iter4;
\r
188 typedef fwd_state4 bkwd_state4;
\r
189 typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
\r
190 typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
\r
191 typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
\r
192 typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
\r
195 typedef bkwd_state0 state;
\r
196 typedef iter4 iterator;
\r
200 template<> struct result_< int,int,int,int,int >
\r
203 typedef int iterator;
\r
209 struct reverse_iter_fold_chunk
\r
215 , typename BackwardOp
\r
216 , typename ForwardOp
\r
220 typedef First iter0;
\r
221 typedef State fwd_state0;
\r
222 typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1;
\r
223 typedef typename mpl::next<iter0>::type iter1;
\r
224 typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2;
\r
225 typedef typename mpl::next<iter1>::type iter2;
\r
226 typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3;
\r
227 typedef typename mpl::next<iter2>::type iter3;
\r
228 typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4;
\r
229 typedef typename mpl::next<iter3>::type iter4;
\r
232 typedef reverse_iter_fold_impl<
\r
233 ( (N - 4) < 0 ? 0 : N - 4 )
\r
241 typedef typename nested_chunk::state bkwd_state4;
\r
242 typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3;
\r
243 typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2;
\r
244 typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1;
\r
245 typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0;
\r
248 typedef bkwd_state0 state;
\r
249 typedef typename nested_chunk::iterator iterator;
\r
257 , typename BackwardOp
\r
258 , typename ForwardOp
\r
260 struct reverse_iter_fold_step;
\r
266 struct reverse_iter_fold_null_step
\r
268 typedef Last iterator;
\r
269 typedef State state;
\r
273 struct reverse_iter_fold_chunk< -1 >
\r
279 , typename BackwardOp
\r
280 , typename ForwardOp
\r
284 typedef typename if_<
\r
285 typename is_same< First,Last >::type
\r
286 , reverse_iter_fold_null_step< Last,State >
\r
287 , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp >
\r
290 typedef typename res_::state state;
\r
291 typedef typename res_::iterator iterator;
\r
295 template<> struct result_< int,int,int,int,int >
\r
298 typedef int iterator;
\r
307 , typename BackwardOp
\r
308 , typename ForwardOp
\r
310 struct reverse_iter_fold_step
\r
312 typedef reverse_iter_fold_chunk< -1 >::template result_<
\r
313 typename mpl::next<First>::type
\r
315 , typename apply2< ForwardOp,State,First >::type
\r
320 typedef typename apply2<
\r
322 , typename nested_step::state
\r
326 typedef typename nested_step::iterator iterator;
\r
334 , typename BackwardOp
\r
335 , typename ForwardOp
\r
337 struct reverse_iter_fold_impl
\r
338 : reverse_iter_fold_chunk<N>
\r
339 ::template result_< First,Last,State,BackwardOp,ForwardOp >
\r