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_/fold_impl.hpp" header
10 // -- DO NOT modify by hand!
12 namespace boost { namespace mpl { namespace aux {
14 /// forward declaration
28 template<> struct fold_chunk<0>
41 typedef iter0 iterator;
45 template<> struct fold_chunk<1>
57 typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
58 typedef typename mpl::next<iter0>::type iter1;
62 typedef iter1 iterator;
66 template<> struct fold_chunk<2>
78 typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
79 typedef typename mpl::next<iter0>::type iter1;
80 typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
81 typedef typename mpl::next<iter1>::type iter2;
85 typedef iter2 iterator;
89 template<> struct fold_chunk<3>
100 typedef State state0;
101 typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
102 typedef typename mpl::next<iter0>::type iter1;
103 typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
104 typedef typename mpl::next<iter1>::type iter2;
105 typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
106 typedef typename mpl::next<iter2>::type iter3;
109 typedef state3 state;
110 typedef iter3 iterator;
114 template<> struct fold_chunk<4>
125 typedef State state0;
126 typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
127 typedef typename mpl::next<iter0>::type iter1;
128 typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
129 typedef typename mpl::next<iter1>::type iter2;
130 typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
131 typedef typename mpl::next<iter2>::type iter3;
132 typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
133 typedef typename mpl::next<iter3>::type iter4;
136 typedef state4 state;
137 typedef iter4 iterator;
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;
185 struct fold_null_step
187 typedef Last iterator;
192 struct fold_chunk< -1 >
202 typedef typename if_<
203 typename is_same< First,Last >::type
204 , fold_null_step< Last,State >
205 , fold_step< First,Last,State,ForwardOp >
208 typedef typename res_::state state;
209 typedef typename res_::iterator iterator;
221 typedef fold_chunk< -1 >::template result_<
222 typename mpl::next<First>::type
224 , typename apply2<ForwardOp,State, typename deref<First>::type>::type
228 typedef typename chunk_::state state;
229 typedef typename chunk_::iterator iterator;
241 ::template result_< First,Last,State,ForwardOp >