16 #ifndef BOOST_MPL11_DETAIL_LEFT_FOLDS_UNTIL_UNROLLED_HPP
17 #define BOOST_MPL11_DETAIL_LEFT_FOLDS_UNTIL_UNROLLED_HPP
22 namespace boost {
namespace mpl11 {
namespace detail {
namespace left_folds {
24 template <
typename ...>
class pred,
25 template <
typename ...>
class f,
28 bool = pred<xs>::type::value
33 template <
typename ...>
class pred,
34 template <
typename ...>
class f,
38 struct single_step<pred, f, z, xs, true> {
44 template <
typename ...>
class pred,
45 template <
typename ...>
class f,
49 struct single_step<pred, f, z, xs, false> {
50 using next = tail<xs>;
51 using state = f<z, head<xs>>;
55 template <
typename ...>
class pred,
56 template <
typename ...>
class f,
59 bool = pred<xs>::type::value
64 template <
typename ...>
class pred,
65 template <
typename ...>
class f,
69 struct multi_step<pred, f, z, xs, true> {
77 template <
typename ...>
class pred,
78 template <
typename ...>
class f,
82 struct multi_step<pred, f, z, xs, false> {
83 using state0 = f<z, head<xs>>;
84 using next0 = tail<xs>;
87 using state1 =
typename single_step<
88 pred, f, state0, next0
91 using next1 =
typename single_step<
92 pred, f, state0, next0
95 using state2 =
typename single_step<
96 pred, f, state1, next1
99 using next2 =
typename single_step<
100 pred, f, state1, next1
103 using state3 =
typename single_step<
104 pred, f, state2, next2
107 using next3 =
typename single_step<
108 pred, f, state2, next2
111 using state4 =
typename single_step<
112 pred, f, state3, next3
115 using next4 =
typename single_step<
116 pred, f, state3, next3
119 using state5 =
typename single_step<
120 pred, f, state4, next4
123 using next5 =
typename single_step<
124 pred, f, state4, next4
128 using next =
typename multi_step<
129 pred, f, state5, next5
132 using state =
typename multi_step<
133 pred, f, state5, next5
145 template <
typename ...>
class predicate,
146 template <
typename ...>
class f,
150 using until_unrolled =
typename multi_step<
151 predicate, f, state, xs
155 #endif // !BOOST_MPL11_DETAIL_LEFT_FOLDS_UNTIL_UNROLLED_HPP
Forward declares the Iterable typeclass.