blob: 1386c6e1f630211bb616d1d73c26728bbfd6cdc5 [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001
2// Copyright Aleksey Gurtovoy 2000-2004
3//
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)
7//
8
9// Preprocessed version of "ndnboost/mpl/apply.hpp" header
10// -- DO NOT modify by hand!
11
12namespace ndnboost { namespace mpl {
13
14template<
15 typename F
16 >
17struct apply0
18
19 : apply_wrap0<
20 typename lambda<F>::type
21
22 >
23{
24 BOOST_MPL_AUX_LAMBDA_SUPPORT(
25 1
26 , apply0
27 , (F )
28 )
29};
30
31namespace aux {
32
33template<>
34struct apply_chooser<0>
35{
36 template<
37 typename F, typename T1, typename T2, typename T3, typename T4
38 , typename T5
39 >
40 struct result_
41 {
42 typedef apply0<
43 F
44 > type;
45 };
46};
47
48} // namespace aux
49
50template<
51 typename F, typename T1
52 >
53struct apply1
54
55 : apply_wrap1<
56 typename lambda<F>::type
57 , T1
58 >
59{
60 BOOST_MPL_AUX_LAMBDA_SUPPORT(
61 2
62 , apply1
63 , (F, T1)
64 )
65};
66
67namespace aux {
68
69template<>
70struct apply_chooser<1>
71{
72 template<
73 typename F, typename T1, typename T2, typename T3, typename T4
74 , typename T5
75 >
76 struct result_
77 {
78 typedef apply1<
79 F, T1
80 > type;
81 };
82};
83
84} // namespace aux
85
86template<
87 typename F, typename T1, typename T2
88 >
89struct apply2
90
91 : apply_wrap2<
92 typename lambda<F>::type
93 , T1, T2
94 >
95{
96 BOOST_MPL_AUX_LAMBDA_SUPPORT(
97 3
98 , apply2
99 , (F, T1, T2)
100 )
101};
102
103namespace aux {
104
105template<>
106struct apply_chooser<2>
107{
108 template<
109 typename F, typename T1, typename T2, typename T3, typename T4
110 , typename T5
111 >
112 struct result_
113 {
114 typedef apply2<
115 F, T1, T2
116 > type;
117 };
118};
119
120} // namespace aux
121
122template<
123 typename F, typename T1, typename T2, typename T3
124 >
125struct apply3
126
127 : apply_wrap3<
128 typename lambda<F>::type
129 , T1, T2, T3
130 >
131{
132 BOOST_MPL_AUX_LAMBDA_SUPPORT(
133 4
134 , apply3
135 , (F, T1, T2, T3)
136 )
137};
138
139namespace aux {
140
141template<>
142struct apply_chooser<3>
143{
144 template<
145 typename F, typename T1, typename T2, typename T3, typename T4
146 , typename T5
147 >
148 struct result_
149 {
150 typedef apply3<
151 F, T1, T2, T3
152 > type;
153 };
154};
155
156} // namespace aux
157
158template<
159 typename F, typename T1, typename T2, typename T3, typename T4
160 >
161struct apply4
162
163 : apply_wrap4<
164 typename lambda<F>::type
165 , T1, T2, T3, T4
166 >
167{
168 BOOST_MPL_AUX_LAMBDA_SUPPORT(
169 5
170 , apply4
171 , (F, T1, T2, T3, T4)
172 )
173};
174
175namespace aux {
176
177template<>
178struct apply_chooser<4>
179{
180 template<
181 typename F, typename T1, typename T2, typename T3, typename T4
182 , typename T5
183 >
184 struct result_
185 {
186 typedef apply4<
187 F, T1, T2, T3, T4
188 > type;
189 };
190};
191
192} // namespace aux
193
194template<
195 typename F, typename T1, typename T2, typename T3, typename T4
196 , typename T5
197 >
198struct apply5
199
200 : apply_wrap5<
201 typename lambda<F>::type
202 , T1, T2, T3, T4, T5
203 >
204{
205 BOOST_MPL_AUX_LAMBDA_SUPPORT(
206 6
207 , apply5
208 , (F, T1, T2, T3, T4, T5)
209 )
210};
211
212namespace aux {
213
214template<>
215struct apply_chooser<5>
216{
217 template<
218 typename F, typename T1, typename T2, typename T3, typename T4
219 , typename T5
220 >
221 struct result_
222 {
223 typedef apply5<
224 F, T1, T2, T3, T4, T5
225 > type;
226 };
227};
228
229} // namespace aux
230
231namespace aux {
232
233template< typename T >
234struct is_apply_arg
235{
236 static bool const value = true;
237};
238
239template<>
240struct is_apply_arg<na>
241{
242 static bool const value = false;
243};
244
245template<
246 typename T1, typename T2, typename T3, typename T4, typename T5
247 >
248struct apply_count_args
249{
250 static int const value = is_apply_arg<T1>::value + is_apply_arg<T2>::value + is_apply_arg<T3>::value + is_apply_arg<T4>::value + is_apply_arg<T5>::value;
251
252};
253
254}
255
256template<
257 typename F, typename T1 = na, typename T2 = na, typename T3 = na
258 , typename T4 = na, typename T5 = na
259 >
260struct apply
261 : aux::apply_chooser<
262 aux::apply_count_args< T1,T2,T3,T4,T5 >::value
263 >::template result_< F,T1,T2,T3,T4,T5 >::type
264{
265};
266
267}}
268