16 #ifndef BOOST_MPL11_DETAIL_LEFT_FOLDS_BOUNDED_HPP
17 #define BOOST_MPL11_DETAIL_LEFT_FOLDS_BOUNDED_HPP
23 namespace boost {
namespace mpl11 {
namespace detail {
namespace left_folds {
27 std_size_t n,
template <
typename ...>
class f,
28 typename state,
typename xs>
30 using left = bounded_impl<
33 f<f<f<f<f<f<state, head<xs>>, head<tail<xs>>>, head<tail<tail<xs>>>>, head<tail<tail<tail<xs>>>>>, head<tail<tail<tail<tail<xs>>>>>>, head<tail<tail<tail<tail<tail<xs>>>>>>>,
34 tail<tail<tail<tail<tail<tail<xs>>>>>>
36 using right = bounded_impl<
39 typename left::result,
43 using rest =
typename right::rest;
44 using result =
typename right::result;
48 template <
template <
typename ...>
class f,
typename state,
typename xs>
49 struct bounded_impl<0, f, state, xs> {
54 template <
template <
typename ...>
class f,
typename state,
typename xs>
55 struct bounded_impl<1, f, state, xs> {
56 using rest = tail<xs>;
57 using result = f<state, head<xs>>;
60 template <
template <
typename ...>
class f,
typename state,
typename xs>
61 struct bounded_impl<2, f, state, xs> {
62 using rest = tail<tail<xs>>;
63 using result = f<f<state, head<xs>>, head<tail<xs>>>;
66 template <
template <
typename ...>
class f,
typename state,
typename xs>
67 struct bounded_impl<3, f, state, xs> {
68 using rest = tail<tail<tail<xs>>>;
69 using result = f<f<f<state, head<xs>>, head<tail<xs>>>, head<tail<tail<xs>>>>;
72 template <
template <
typename ...>
class f,
typename state,
typename xs>
73 struct bounded_impl<4, f, state, xs> {
74 using rest = tail<tail<tail<tail<xs>>>>;
75 using result = f<f<f<f<state, head<xs>>, head<tail<xs>>>, head<tail<tail<xs>>>>, head<tail<tail<tail<xs>>>>>;
78 template <
template <
typename ...>
class f,
typename state,
typename xs>
79 struct bounded_impl<5, f, state, xs> {
80 using rest = tail<tail<tail<tail<tail<xs>>>>>;
81 using result = f<f<f<f<f<state, head<xs>>, head<tail<xs>>>, head<tail<tail<xs>>>>, head<tail<tail<tail<xs>>>>>, head<tail<tail<tail<tail<xs>>>>>>;
94 template <
typename ...>
class f,
98 using bounded =
typename bounded_impl<n, f, state, xs>::result;
101 #endif // !BOOST_MPL11_DETAIL_LEFT_FOLDS_BOUNDED_HPP
Defines boost::mpl11::detail::std_size_t.
Forward declares the Iterable typeclass.