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 the main "fold_impl.hpp" header
10 // -- DO NOT modify by hand!
12 namespace boost
{ namespace mpl
{ namespace aux
{
14 /// forward declaration
31 struct fold_impl
< 0,First
,Last
,State
,ForwardOp
>
36 typedef iter0 iterator
;
45 struct fold_impl
< 1,First
,Last
,State
,ForwardOp
>
49 typedef typename apply2
< ForwardOp
, state0
, typename deref
<iter0
>::type
>::type state1
;
50 typedef typename
mpl::next
<iter0
>::type iter1
;
54 typedef iter1 iterator
;
63 struct fold_impl
< 2,First
,Last
,State
,ForwardOp
>
67 typedef typename apply2
< ForwardOp
, state0
, typename deref
<iter0
>::type
>::type state1
;
68 typedef typename
mpl::next
<iter0
>::type iter1
;
69 typedef typename apply2
< ForwardOp
, state1
, typename deref
<iter1
>::type
>::type state2
;
70 typedef typename
mpl::next
<iter1
>::type iter2
;
74 typedef iter2 iterator
;
83 struct fold_impl
< 3,First
,Last
,State
,ForwardOp
>
87 typedef typename apply2
< ForwardOp
, state0
, typename deref
<iter0
>::type
>::type state1
;
88 typedef typename
mpl::next
<iter0
>::type iter1
;
89 typedef typename apply2
< ForwardOp
, state1
, typename deref
<iter1
>::type
>::type state2
;
90 typedef typename
mpl::next
<iter1
>::type iter2
;
91 typedef typename apply2
< ForwardOp
, state2
, typename deref
<iter2
>::type
>::type state3
;
92 typedef typename
mpl::next
<iter2
>::type iter3
;
96 typedef iter3 iterator
;
105 struct fold_impl
< 4,First
,Last
,State
,ForwardOp
>
108 typedef State state0
;
109 typedef typename apply2
< ForwardOp
, state0
, typename deref
<iter0
>::type
>::type state1
;
110 typedef typename
mpl::next
<iter0
>::type iter1
;
111 typedef typename apply2
< ForwardOp
, state1
, typename deref
<iter1
>::type
>::type state2
;
112 typedef typename
mpl::next
<iter1
>::type iter2
;
113 typedef typename apply2
< ForwardOp
, state2
, typename deref
<iter2
>::type
>::type state3
;
114 typedef typename
mpl::next
<iter2
>::type iter3
;
115 typedef typename apply2
< ForwardOp
, state3
, typename deref
<iter3
>::type
>::type state4
;
116 typedef typename
mpl::next
<iter3
>::type iter4
;
119 typedef state4 state
;
120 typedef iter4 iterator
;
141 ( (N
- 4) < 0 ? 0 : N
- 4 )
142 , typename
chunk_::iterator
144 , typename
chunk_::state
148 typedef typename
res_::state state
;
149 typedef typename
res_::iterator iterator
;
158 struct fold_impl
< -1,First
,Last
,State
,ForwardOp
>
161 , typename
mpl::next
<First
>::type
163 , typename apply2
<ForwardOp
,State
, typename deref
<First
>::type
>::type
174 struct fold_impl
< -1,Last
,Last
,State
,ForwardOp
>
177 typedef Last iterator
;