MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
until_unrolled.hpp
Go to the documentation of this file.
1 
12 // GENERATED HEADER: DO NOT EDIT.
15 
16 #ifndef BOOST_MPL11_DETAIL_LEFT_FOLDS_UNTIL_UNROLLED_HPP
17 #define BOOST_MPL11_DETAIL_LEFT_FOLDS_UNTIL_UNROLLED_HPP
18 
20 
21 
22 namespace boost { namespace mpl11 { namespace detail { namespace left_folds {
23  template <
24  template <typename ...> class pred,
25  template <typename ...> class f,
26  typename z,
27  typename xs,
28  bool = pred<xs>::type::value
29  >
30  struct single_step;
31 
32  template <
33  template <typename ...> class pred,
34  template <typename ...> class f,
35  typename z,
36  typename xs
37  >
38  struct single_step<pred, f, z, xs, true> {
39  using next = xs;
40  using state = z;
41  };
42 
43  template <
44  template <typename ...> class pred,
45  template <typename ...> class f,
46  typename z,
47  typename xs
48  >
49  struct single_step<pred, f, z, xs, false> {
50  using next = tail<xs>;
51  using state = f<z, head<xs>>;
52  };
53 
54  template <
55  template <typename ...> class pred,
56  template <typename ...> class f,
57  typename z,
58  typename xs,
59  bool = pred<xs>::type::value
60  >
61  struct multi_step;
62 
63  template <
64  template <typename ...> class pred,
65  template <typename ...> class f,
66  typename z,
67  typename xs
68  >
69  struct multi_step<pred, f, z, xs, true> {
70  using next = xs;
71  using state = z;
72  };
73 
74 
75 
76  template <
77  template <typename ...> class pred,
78  template <typename ...> class f,
79  typename z,
80  typename xs
81  >
82  struct multi_step<pred, f, z, xs, false> {
83  using state0 = f<z, head<xs>>;
84  using next0 = tail<xs>;
85 
86 
87  using state1 = typename single_step<
88  pred, f, state0, next0
89  >::state;
90 
91  using next1 = typename single_step<
92  pred, f, state0, next0
93  >::next;
94 
95  using state2 = typename single_step<
96  pred, f, state1, next1
97  >::state;
98 
99  using next2 = typename single_step<
100  pred, f, state1, next1
101  >::next;
102 
103  using state3 = typename single_step<
104  pred, f, state2, next2
105  >::state;
106 
107  using next3 = typename single_step<
108  pred, f, state2, next2
109  >::next;
110 
111  using state4 = typename single_step<
112  pred, f, state3, next3
113  >::state;
114 
115  using next4 = typename single_step<
116  pred, f, state3, next3
117  >::next;
118 
119  using state5 = typename single_step<
120  pred, f, state4, next4
121  >::state;
122 
123  using next5 = typename single_step<
124  pred, f, state4, next4
125  >::next;
126 
127 
128  using next = typename multi_step<
129  pred, f, state5, next5
130  >::next;
131 
132  using state = typename multi_step<
133  pred, f, state5, next5
134  >::state;
135  };
136 
144  template <
145  template <typename ...> class predicate,
146  template <typename ...> class f,
147  typename state,
148  typename xs
149  >
150  using until_unrolled = typename multi_step<
151  predicate, f, state, xs
152  >::state;
153 }}}} // end namespace boost::mpl11::detail::left_folds
154 
155 #endif // !BOOST_MPL11_DETAIL_LEFT_FOLDS_UNTIL_UNROLLED_HPP
Forward declares the Iterable typeclass.