MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
variadic_aliased.hpp
Go to the documentation of this file.
1 
12 // GENERATED HEADER: DO NOT EDIT.
15 
16 #ifndef BOOST_MPL11_DETAIL_LEFT_FOLDS_VARIADIC_ALIASED_HPP
17 #define BOOST_MPL11_DETAIL_LEFT_FOLDS_VARIADIC_ALIASED_HPP
18 
19 namespace boost { namespace mpl11 { namespace detail { namespace left_folds {
20 
21 
22  template <unsigned n>
23  struct variadic_aliased_impl;
24 
25  template <>
26  struct variadic_aliased_impl< 6 > {
27  template <
28  template <typename ...> class f,
29  typename state
30  , typename x1, typename x2, typename x3, typename x4, typename x5, typename x6,
31  typename ...xs>
32  using apply =
33  typename variadic_aliased_impl< (sizeof...(xs) > 6 ? 6 : sizeof...(xs)) >::
34  template apply<
35  f,
36  f<f<f<f<f<f<state, x1>, x2>, x3>, x4>, x5>, x6>,
37  xs...
38  >;
39  };
40 
41 
42  template <>
43  struct variadic_aliased_impl< 0 > {
44  template <
45  template <typename ...> class f,
46  typename state
47 
48  >
49  using apply = state;
50  };
51 
52  template <>
53  struct variadic_aliased_impl< 1 > {
54  template <
55  template <typename ...> class f,
56  typename state
57  , typename x1
58  >
59  using apply = f<state, x1>;
60  };
61 
62  template <>
63  struct variadic_aliased_impl< 2 > {
64  template <
65  template <typename ...> class f,
66  typename state
67  , typename x1, typename x2
68  >
69  using apply = f<f<state, x1>, x2>;
70  };
71 
72  template <>
73  struct variadic_aliased_impl< 3 > {
74  template <
75  template <typename ...> class f,
76  typename state
77  , typename x1, typename x2, typename x3
78  >
79  using apply = f<f<f<state, x1>, x2>, x3>;
80  };
81 
82  template <>
83  struct variadic_aliased_impl< 4 > {
84  template <
85  template <typename ...> class f,
86  typename state
87  , typename x1, typename x2, typename x3, typename x4
88  >
89  using apply = f<f<f<f<state, x1>, x2>, x3>, x4>;
90  };
91 
92  template <>
93  struct variadic_aliased_impl< 5 > {
94  template <
95  template <typename ...> class f,
96  typename state
97  , typename x1, typename x2, typename x3, typename x4, typename x5
98  >
99  using apply = f<f<f<f<f<state, x1>, x2>, x3>, x4>, x5>;
100  };
101 
102 
110  template <template <typename ...> class f, typename state, typename ...xs>
112  : variadic_aliased_impl< (sizeof...(xs) > 6 ? 6 : sizeof...(xs)) >::
113  template apply<f, state, xs...>
114  { };
115 }}}} // end namespace boost::mpl11::detail::left_folds
116 
117 #endif // !BOOST_MPL11_DETAIL_LEFT_FOLDS_VARIADIC_ALIASED_HPP
Recursive alias-based variadic left fold.
Definition: variadic_aliased.hpp:111
Invokes a metafunction class with the given arguments.
Definition: functional.hpp:39