blob: a2a565eb2f2e2c0f473ad1bd046c12148b1f49d5 [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001
2// Copyright Peter Dimov 2001
3// Copyright Aleksey Gurtovoy 2001-2004
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
9
10// Preprocessed version of "ndnboost/mpl/aux_/basic_bind.hpp" header
11// -- DO NOT modify by hand!
12
13namespace ndnboost { namespace mpl {
14
15namespace aux {
16
17template<
18 typename T, typename U1, typename U2, typename U3, typename U4
19 , typename U5
20 >
21struct resolve_bind_arg
22{
23 typedef T type;
24};
25
26template<
27 int N, typename U1, typename U2, typename U3, typename U4, typename U5
28 >
29struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
30{
31 typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
32};
33
34template<
35 typename F, typename T1, typename T2, typename T3, typename T4
36 , typename T5, typename U1, typename U2, typename U3, typename U4
37 , typename U5
38 >
39struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 >
40{
41 typedef bind< F,T1,T2,T3,T4,T5 > f_;
42 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
43};
44
45} // namespace aux
46
47template<
48 typename F
49 >
50struct bind0
51{
52 template<
53 typename U1 = na, typename U2 = na, typename U3 = na
54 , typename U4 = na, typename U5 = na
55 >
56 struct apply
57 {
58 private:
59 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
60
61 public:
62 typedef typename apply_wrap0<
63 f_
64 >::type type;
65
66 };
67};
68
69namespace aux {
70
71template<
72 typename F, typename U1, typename U2, typename U3, typename U4
73 , typename U5
74 >
75struct resolve_bind_arg<
76 bind0<F>, U1, U2, U3, U4, U5
77 >
78{
79 typedef bind0<F> f_;
80 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
81};
82
83} // namespace aux
84
85BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
86BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
87
88template<
89 typename F
90 >
91struct bind< F,na,na,na,na,na >
92 : bind0<F>
93{
94};
95
96template<
97 typename F, typename T1
98 >
99struct bind1
100{
101 template<
102 typename U1 = na, typename U2 = na, typename U3 = na
103 , typename U4 = na, typename U5 = na
104 >
105 struct apply
106 {
107 private:
108 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
109 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
110
111 public:
112 typedef typename apply_wrap1<
113 f_
114 , typename t1::type
115 >::type type;
116
117 };
118};
119
120namespace aux {
121
122template<
123 typename F, typename T1, typename U1, typename U2, typename U3
124 , typename U4, typename U5
125 >
126struct resolve_bind_arg<
127 bind1< F,T1 >, U1, U2, U3, U4, U5
128 >
129{
130 typedef bind1< F,T1 > f_;
131 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
132};
133
134} // namespace aux
135
136BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
137BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
138
139template<
140 typename F, typename T1
141 >
142struct bind< F,T1,na,na,na,na >
143 : bind1< F,T1 >
144{
145};
146
147template<
148 typename F, typename T1, typename T2
149 >
150struct bind2
151{
152 template<
153 typename U1 = na, typename U2 = na, typename U3 = na
154 , typename U4 = na, typename U5 = na
155 >
156 struct apply
157 {
158 private:
159 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
160 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
161 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
162
163 public:
164 typedef typename apply_wrap2<
165 f_
166 , typename t1::type, typename t2::type
167 >::type type;
168
169 };
170};
171
172namespace aux {
173
174template<
175 typename F, typename T1, typename T2, typename U1, typename U2
176 , typename U3, typename U4, typename U5
177 >
178struct resolve_bind_arg<
179 bind2< F,T1,T2 >, U1, U2, U3, U4, U5
180 >
181{
182 typedef bind2< F,T1,T2 > f_;
183 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
184};
185
186} // namespace aux
187
188BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
189BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
190
191template<
192 typename F, typename T1, typename T2
193 >
194struct bind< F,T1,T2,na,na,na >
195 : bind2< F,T1,T2 >
196{
197};
198
199template<
200 typename F, typename T1, typename T2, typename T3
201 >
202struct bind3
203{
204 template<
205 typename U1 = na, typename U2 = na, typename U3 = na
206 , typename U4 = na, typename U5 = na
207 >
208 struct apply
209 {
210 private:
211 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
212 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
213 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
214 typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
215
216 public:
217 typedef typename apply_wrap3<
218 f_
219 , typename t1::type, typename t2::type, typename t3::type
220 >::type type;
221
222 };
223};
224
225namespace aux {
226
227template<
228 typename F, typename T1, typename T2, typename T3, typename U1
229 , typename U2, typename U3, typename U4, typename U5
230 >
231struct resolve_bind_arg<
232 bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
233 >
234{
235 typedef bind3< F,T1,T2,T3 > f_;
236 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
237};
238
239} // namespace aux
240
241BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
242BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
243
244template<
245 typename F, typename T1, typename T2, typename T3
246 >
247struct bind< F,T1,T2,T3,na,na >
248 : bind3< F,T1,T2,T3 >
249{
250};
251
252template<
253 typename F, typename T1, typename T2, typename T3, typename T4
254 >
255struct bind4
256{
257 template<
258 typename U1 = na, typename U2 = na, typename U3 = na
259 , typename U4 = na, typename U5 = na
260 >
261 struct apply
262 {
263 private:
264 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
265 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
266 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
267 typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
268 typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
269
270 public:
271 typedef typename apply_wrap4<
272 f_
273 , typename t1::type, typename t2::type, typename t3::type
274 , typename t4::type
275 >::type type;
276
277 };
278};
279
280namespace aux {
281
282template<
283 typename F, typename T1, typename T2, typename T3, typename T4
284 , typename U1, typename U2, typename U3, typename U4, typename U5
285 >
286struct resolve_bind_arg<
287 bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
288 >
289{
290 typedef bind4< F,T1,T2,T3,T4 > f_;
291 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
292};
293
294} // namespace aux
295
296BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
297BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
298
299template<
300 typename F, typename T1, typename T2, typename T3, typename T4
301 >
302struct bind< F,T1,T2,T3,T4,na >
303 : bind4< F,T1,T2,T3,T4 >
304{
305};
306
307template<
308 typename F, typename T1, typename T2, typename T3, typename T4
309 , typename T5
310 >
311struct bind5
312{
313 template<
314 typename U1 = na, typename U2 = na, typename U3 = na
315 , typename U4 = na, typename U5 = na
316 >
317 struct apply
318 {
319 private:
320 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
321 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
322 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
323 typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
324 typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
325 typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
326
327 public:
328 typedef typename apply_wrap5<
329 f_
330 , typename t1::type, typename t2::type, typename t3::type
331 , typename t4::type, typename t5::type
332 >::type type;
333
334 };
335};
336
337namespace aux {
338
339template<
340 typename F, typename T1, typename T2, typename T3, typename T4
341 , typename T5, typename U1, typename U2, typename U3, typename U4
342 , typename U5
343 >
344struct resolve_bind_arg<
345 bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
346 >
347{
348 typedef bind5< F,T1,T2,T3,T4,T5 > f_;
349 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
350};
351
352} // namespace aux
353
354BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
355BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
356
357/// primary template (not a specialization!)
358
359template<
360 typename F, typename T1, typename T2, typename T3, typename T4
361 , typename T5
362 >
363struct bind
364 : bind5< F,T1,T2,T3,T4,T5 >
365{
366};
367
368/// if_/eval_if specializations
369template< template< typename T1, typename T2, typename T3 > class F, typename Tag >
370struct quote3;
371
372template< typename T1, typename T2, typename T3 > struct if_;
373
374template<
375 typename Tag, typename T1, typename T2, typename T3
376 >
377struct bind3<
378 quote3< if_,Tag >
379 , T1, T2, T3
380 >
381{
382 template<
383 typename U1 = na, typename U2 = na, typename U3 = na
384 , typename U4 = na, typename U5 = na
385 >
386 struct apply
387 {
388 private:
389 typedef mpl::arg<1> n1;
390 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
391 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
392 typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
393 typedef typename if_<
394 typename t1::type
395 , t2, t3
396 >::type f_;
397
398 public:
399 typedef typename f_::type type;
400 };
401};
402
403template<
404 template< typename T1, typename T2, typename T3 > class F, typename Tag
405 >
406struct quote3;
407
408template< typename T1, typename T2, typename T3 > struct eval_if;
409
410template<
411 typename Tag, typename T1, typename T2, typename T3
412 >
413struct bind3<
414 quote3< eval_if,Tag >
415 , T1, T2, T3
416 >
417{
418 template<
419 typename U1 = na, typename U2 = na, typename U3 = na
420 , typename U4 = na, typename U5 = na
421 >
422 struct apply
423 {
424 private:
425 typedef mpl::arg<1> n1;
426 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
427 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
428 typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
429 typedef typename eval_if<
430 typename t1::type
431 , t2, t3
432 >::type f_;
433
434 public:
435 typedef typename f_::type type;
436 };
437};
438
439}}
440