Chris@16
|
1
|
Chris@16
|
2 // Copyright Peter Dimov 2001
|
Chris@16
|
3 // Copyright Aleksey Gurtovoy 2001-2004
|
Chris@16
|
4 //
|
Chris@16
|
5 // Distributed under the Boost Software License, Version 1.0.
|
Chris@16
|
6 // (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
7 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
8 //
|
Chris@16
|
9
|
Chris@16
|
10 // Preprocessed version of "boost/mpl/bind.hpp" header
|
Chris@16
|
11 // -- DO NOT modify by hand!
|
Chris@16
|
12
|
Chris@16
|
13 namespace boost { namespace mpl {
|
Chris@16
|
14
|
Chris@16
|
15 namespace aux {
|
Chris@16
|
16
|
Chris@16
|
17 template<
|
Chris@16
|
18 typename T, typename U1, typename U2, typename U3, typename U4
|
Chris@16
|
19 , typename U5
|
Chris@16
|
20 >
|
Chris@16
|
21 struct resolve_bind_arg
|
Chris@16
|
22 {
|
Chris@16
|
23 typedef T type;
|
Chris@16
|
24 };
|
Chris@16
|
25
|
Chris@16
|
26 template<
|
Chris@16
|
27 typename T
|
Chris@16
|
28 , typename Arg
|
Chris@16
|
29 >
|
Chris@16
|
30 struct replace_unnamed_arg
|
Chris@16
|
31 {
|
Chris@16
|
32 typedef Arg next;
|
Chris@16
|
33 typedef T type;
|
Chris@16
|
34 };
|
Chris@16
|
35
|
Chris@16
|
36 template<
|
Chris@16
|
37 typename Arg
|
Chris@16
|
38 >
|
Chris@16
|
39 struct replace_unnamed_arg< arg< -1 >, Arg >
|
Chris@16
|
40 {
|
Chris@16
|
41 typedef typename Arg::next next;
|
Chris@16
|
42 typedef Arg type;
|
Chris@16
|
43 };
|
Chris@16
|
44
|
Chris@16
|
45 template<
|
Chris@16
|
46 int N, typename U1, typename U2, typename U3, typename U4, typename U5
|
Chris@16
|
47 >
|
Chris@16
|
48 struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
|
Chris@16
|
49 {
|
Chris@16
|
50 typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
|
Chris@16
|
51 };
|
Chris@16
|
52
|
Chris@16
|
53 template<
|
Chris@16
|
54 typename F, typename T1, typename T2, typename T3, typename T4
|
Chris@16
|
55 , typename T5, typename U1, typename U2, typename U3, typename U4
|
Chris@16
|
56 , typename U5
|
Chris@16
|
57 >
|
Chris@16
|
58 struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 >
|
Chris@16
|
59 {
|
Chris@16
|
60 typedef bind< F,T1,T2,T3,T4,T5 > f_;
|
Chris@16
|
61 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
Chris@16
|
62 };
|
Chris@16
|
63
|
Chris@16
|
64 } // namespace aux
|
Chris@16
|
65
|
Chris@16
|
66 template<
|
Chris@16
|
67 typename F
|
Chris@16
|
68 >
|
Chris@16
|
69 struct bind0
|
Chris@16
|
70 {
|
Chris@16
|
71 template<
|
Chris@16
|
72 typename U1 = na, typename U2 = na, typename U3 = na
|
Chris@16
|
73 , typename U4 = na, typename U5 = na
|
Chris@16
|
74 >
|
Chris@16
|
75 struct apply
|
Chris@16
|
76 {
|
Chris@16
|
77 private:
|
Chris@16
|
78 typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
Chris@16
|
79 typedef typename r0::type a0;
|
Chris@16
|
80 typedef typename r0::next n1;
|
Chris@16
|
81 typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
Chris@16
|
82 ///
|
Chris@16
|
83 public:
|
Chris@16
|
84 typedef typename apply_wrap0<
|
Chris@16
|
85 f_
|
Chris@16
|
86 >::type type;
|
Chris@16
|
87
|
Chris@16
|
88 };
|
Chris@16
|
89 };
|
Chris@16
|
90
|
Chris@16
|
91 namespace aux {
|
Chris@16
|
92
|
Chris@16
|
93 template<
|
Chris@16
|
94 typename F, typename U1, typename U2, typename U3, typename U4
|
Chris@16
|
95 , typename U5
|
Chris@16
|
96 >
|
Chris@16
|
97 struct resolve_bind_arg<
|
Chris@16
|
98 bind0<F>, U1, U2, U3, U4, U5
|
Chris@16
|
99 >
|
Chris@16
|
100 {
|
Chris@16
|
101 typedef bind0<F> f_;
|
Chris@16
|
102 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
Chris@16
|
103 };
|
Chris@16
|
104
|
Chris@16
|
105 } // namespace aux
|
Chris@16
|
106
|
Chris@16
|
107 BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
|
Chris@16
|
108 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
|
Chris@16
|
109
|
Chris@16
|
110 template<
|
Chris@16
|
111 typename F
|
Chris@16
|
112 >
|
Chris@16
|
113 struct bind< F,na,na,na,na,na >
|
Chris@16
|
114 : bind0<F>
|
Chris@16
|
115 {
|
Chris@16
|
116 };
|
Chris@16
|
117
|
Chris@16
|
118 template<
|
Chris@16
|
119 typename F, typename T1
|
Chris@16
|
120 >
|
Chris@16
|
121 struct bind1
|
Chris@16
|
122 {
|
Chris@16
|
123 template<
|
Chris@16
|
124 typename U1 = na, typename U2 = na, typename U3 = na
|
Chris@16
|
125 , typename U4 = na, typename U5 = na
|
Chris@16
|
126 >
|
Chris@16
|
127 struct apply
|
Chris@16
|
128 {
|
Chris@16
|
129 private:
|
Chris@16
|
130 typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
Chris@16
|
131 typedef typename r0::type a0;
|
Chris@16
|
132 typedef typename r0::next n1;
|
Chris@16
|
133 typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
Chris@16
|
134 ///
|
Chris@16
|
135 typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
Chris@16
|
136 typedef typename r1::type a1;
|
Chris@16
|
137 typedef typename r1::next n2;
|
Chris@16
|
138 typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
Chris@16
|
139 ///
|
Chris@16
|
140 public:
|
Chris@16
|
141 typedef typename apply_wrap1<
|
Chris@16
|
142 f_
|
Chris@16
|
143 , typename t1::type
|
Chris@16
|
144 >::type type;
|
Chris@16
|
145
|
Chris@16
|
146 };
|
Chris@16
|
147 };
|
Chris@16
|
148
|
Chris@16
|
149 namespace aux {
|
Chris@16
|
150
|
Chris@16
|
151 template<
|
Chris@16
|
152 typename F, typename T1, typename U1, typename U2, typename U3
|
Chris@16
|
153 , typename U4, typename U5
|
Chris@16
|
154 >
|
Chris@16
|
155 struct resolve_bind_arg<
|
Chris@16
|
156 bind1< F,T1 >, U1, U2, U3, U4, U5
|
Chris@16
|
157 >
|
Chris@16
|
158 {
|
Chris@16
|
159 typedef bind1< F,T1 > f_;
|
Chris@16
|
160 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
Chris@16
|
161 };
|
Chris@16
|
162
|
Chris@16
|
163 } // namespace aux
|
Chris@16
|
164
|
Chris@16
|
165 BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
|
Chris@16
|
166 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
|
Chris@16
|
167
|
Chris@16
|
168 template<
|
Chris@16
|
169 typename F, typename T1
|
Chris@16
|
170 >
|
Chris@16
|
171 struct bind< F,T1,na,na,na,na >
|
Chris@16
|
172 : bind1< F,T1 >
|
Chris@16
|
173 {
|
Chris@16
|
174 };
|
Chris@16
|
175
|
Chris@16
|
176 template<
|
Chris@16
|
177 typename F, typename T1, typename T2
|
Chris@16
|
178 >
|
Chris@16
|
179 struct bind2
|
Chris@16
|
180 {
|
Chris@16
|
181 template<
|
Chris@16
|
182 typename U1 = na, typename U2 = na, typename U3 = na
|
Chris@16
|
183 , typename U4 = na, typename U5 = na
|
Chris@16
|
184 >
|
Chris@16
|
185 struct apply
|
Chris@16
|
186 {
|
Chris@16
|
187 private:
|
Chris@16
|
188 typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
Chris@16
|
189 typedef typename r0::type a0;
|
Chris@16
|
190 typedef typename r0::next n1;
|
Chris@16
|
191 typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
Chris@16
|
192 ///
|
Chris@16
|
193 typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
Chris@16
|
194 typedef typename r1::type a1;
|
Chris@16
|
195 typedef typename r1::next n2;
|
Chris@16
|
196 typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
Chris@16
|
197 ///
|
Chris@16
|
198 typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
Chris@16
|
199 typedef typename r2::type a2;
|
Chris@16
|
200 typedef typename r2::next n3;
|
Chris@16
|
201 typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
Chris@16
|
202 ///
|
Chris@16
|
203 public:
|
Chris@16
|
204 typedef typename apply_wrap2<
|
Chris@16
|
205 f_
|
Chris@16
|
206 , typename t1::type, typename t2::type
|
Chris@16
|
207 >::type type;
|
Chris@16
|
208
|
Chris@16
|
209 };
|
Chris@16
|
210 };
|
Chris@16
|
211
|
Chris@16
|
212 namespace aux {
|
Chris@16
|
213
|
Chris@16
|
214 template<
|
Chris@16
|
215 typename F, typename T1, typename T2, typename U1, typename U2
|
Chris@16
|
216 , typename U3, typename U4, typename U5
|
Chris@16
|
217 >
|
Chris@16
|
218 struct resolve_bind_arg<
|
Chris@16
|
219 bind2< F,T1,T2 >, U1, U2, U3, U4, U5
|
Chris@16
|
220 >
|
Chris@16
|
221 {
|
Chris@16
|
222 typedef bind2< F,T1,T2 > f_;
|
Chris@16
|
223 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
Chris@16
|
224 };
|
Chris@16
|
225
|
Chris@16
|
226 } // namespace aux
|
Chris@16
|
227
|
Chris@16
|
228 BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
|
Chris@16
|
229 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
|
Chris@16
|
230
|
Chris@16
|
231 template<
|
Chris@16
|
232 typename F, typename T1, typename T2
|
Chris@16
|
233 >
|
Chris@16
|
234 struct bind< F,T1,T2,na,na,na >
|
Chris@16
|
235 : bind2< F,T1,T2 >
|
Chris@16
|
236 {
|
Chris@16
|
237 };
|
Chris@16
|
238
|
Chris@16
|
239 template<
|
Chris@16
|
240 typename F, typename T1, typename T2, typename T3
|
Chris@16
|
241 >
|
Chris@16
|
242 struct bind3
|
Chris@16
|
243 {
|
Chris@16
|
244 template<
|
Chris@16
|
245 typename U1 = na, typename U2 = na, typename U3 = na
|
Chris@16
|
246 , typename U4 = na, typename U5 = na
|
Chris@16
|
247 >
|
Chris@16
|
248 struct apply
|
Chris@16
|
249 {
|
Chris@16
|
250 private:
|
Chris@16
|
251 typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
Chris@16
|
252 typedef typename r0::type a0;
|
Chris@16
|
253 typedef typename r0::next n1;
|
Chris@16
|
254 typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
Chris@16
|
255 ///
|
Chris@16
|
256 typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
Chris@16
|
257 typedef typename r1::type a1;
|
Chris@16
|
258 typedef typename r1::next n2;
|
Chris@16
|
259 typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
Chris@16
|
260 ///
|
Chris@16
|
261 typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
Chris@16
|
262 typedef typename r2::type a2;
|
Chris@16
|
263 typedef typename r2::next n3;
|
Chris@16
|
264 typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
Chris@16
|
265 ///
|
Chris@16
|
266 typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
Chris@16
|
267 typedef typename r3::type a3;
|
Chris@16
|
268 typedef typename r3::next n4;
|
Chris@16
|
269 typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
|
Chris@16
|
270 ///
|
Chris@16
|
271 public:
|
Chris@16
|
272 typedef typename apply_wrap3<
|
Chris@16
|
273 f_
|
Chris@16
|
274 , typename t1::type, typename t2::type, typename t3::type
|
Chris@16
|
275 >::type type;
|
Chris@16
|
276
|
Chris@16
|
277 };
|
Chris@16
|
278 };
|
Chris@16
|
279
|
Chris@16
|
280 namespace aux {
|
Chris@16
|
281
|
Chris@16
|
282 template<
|
Chris@16
|
283 typename F, typename T1, typename T2, typename T3, typename U1
|
Chris@16
|
284 , typename U2, typename U3, typename U4, typename U5
|
Chris@16
|
285 >
|
Chris@16
|
286 struct resolve_bind_arg<
|
Chris@16
|
287 bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
|
Chris@16
|
288 >
|
Chris@16
|
289 {
|
Chris@16
|
290 typedef bind3< F,T1,T2,T3 > f_;
|
Chris@16
|
291 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
Chris@16
|
292 };
|
Chris@16
|
293
|
Chris@16
|
294 } // namespace aux
|
Chris@16
|
295
|
Chris@16
|
296 BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
|
Chris@16
|
297 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
|
Chris@16
|
298
|
Chris@16
|
299 template<
|
Chris@16
|
300 typename F, typename T1, typename T2, typename T3
|
Chris@16
|
301 >
|
Chris@16
|
302 struct bind< F,T1,T2,T3,na,na >
|
Chris@16
|
303 : bind3< F,T1,T2,T3 >
|
Chris@16
|
304 {
|
Chris@16
|
305 };
|
Chris@16
|
306
|
Chris@16
|
307 template<
|
Chris@16
|
308 typename F, typename T1, typename T2, typename T3, typename T4
|
Chris@16
|
309 >
|
Chris@16
|
310 struct bind4
|
Chris@16
|
311 {
|
Chris@16
|
312 template<
|
Chris@16
|
313 typename U1 = na, typename U2 = na, typename U3 = na
|
Chris@16
|
314 , typename U4 = na, typename U5 = na
|
Chris@16
|
315 >
|
Chris@16
|
316 struct apply
|
Chris@16
|
317 {
|
Chris@16
|
318 private:
|
Chris@16
|
319 typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
Chris@16
|
320 typedef typename r0::type a0;
|
Chris@16
|
321 typedef typename r0::next n1;
|
Chris@16
|
322 typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
Chris@16
|
323 ///
|
Chris@16
|
324 typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
Chris@16
|
325 typedef typename r1::type a1;
|
Chris@16
|
326 typedef typename r1::next n2;
|
Chris@16
|
327 typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
Chris@16
|
328 ///
|
Chris@16
|
329 typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
Chris@16
|
330 typedef typename r2::type a2;
|
Chris@16
|
331 typedef typename r2::next n3;
|
Chris@16
|
332 typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
Chris@16
|
333 ///
|
Chris@16
|
334 typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
Chris@16
|
335 typedef typename r3::type a3;
|
Chris@16
|
336 typedef typename r3::next n4;
|
Chris@16
|
337 typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
|
Chris@16
|
338 ///
|
Chris@16
|
339 typedef aux::replace_unnamed_arg< T4,n4 > r4;
|
Chris@16
|
340 typedef typename r4::type a4;
|
Chris@16
|
341 typedef typename r4::next n5;
|
Chris@16
|
342 typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
|
Chris@16
|
343 ///
|
Chris@16
|
344 public:
|
Chris@16
|
345 typedef typename apply_wrap4<
|
Chris@16
|
346 f_
|
Chris@16
|
347 , typename t1::type, typename t2::type, typename t3::type
|
Chris@16
|
348 , typename t4::type
|
Chris@16
|
349 >::type type;
|
Chris@16
|
350
|
Chris@16
|
351 };
|
Chris@16
|
352 };
|
Chris@16
|
353
|
Chris@16
|
354 namespace aux {
|
Chris@16
|
355
|
Chris@16
|
356 template<
|
Chris@16
|
357 typename F, typename T1, typename T2, typename T3, typename T4
|
Chris@16
|
358 , typename U1, typename U2, typename U3, typename U4, typename U5
|
Chris@16
|
359 >
|
Chris@16
|
360 struct resolve_bind_arg<
|
Chris@16
|
361 bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
|
Chris@16
|
362 >
|
Chris@16
|
363 {
|
Chris@16
|
364 typedef bind4< F,T1,T2,T3,T4 > f_;
|
Chris@16
|
365 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
Chris@16
|
366 };
|
Chris@16
|
367
|
Chris@16
|
368 } // namespace aux
|
Chris@16
|
369
|
Chris@16
|
370 BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
|
Chris@16
|
371 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
|
Chris@16
|
372
|
Chris@16
|
373 template<
|
Chris@16
|
374 typename F, typename T1, typename T2, typename T3, typename T4
|
Chris@16
|
375 >
|
Chris@16
|
376 struct bind< F,T1,T2,T3,T4,na >
|
Chris@16
|
377 : bind4< F,T1,T2,T3,T4 >
|
Chris@16
|
378 {
|
Chris@16
|
379 };
|
Chris@16
|
380
|
Chris@16
|
381 template<
|
Chris@16
|
382 typename F, typename T1, typename T2, typename T3, typename T4
|
Chris@16
|
383 , typename T5
|
Chris@16
|
384 >
|
Chris@16
|
385 struct bind5
|
Chris@16
|
386 {
|
Chris@16
|
387 template<
|
Chris@16
|
388 typename U1 = na, typename U2 = na, typename U3 = na
|
Chris@16
|
389 , typename U4 = na, typename U5 = na
|
Chris@16
|
390 >
|
Chris@16
|
391 struct apply
|
Chris@16
|
392 {
|
Chris@16
|
393 private:
|
Chris@16
|
394 typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
Chris@16
|
395 typedef typename r0::type a0;
|
Chris@16
|
396 typedef typename r0::next n1;
|
Chris@16
|
397 typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
Chris@16
|
398 ///
|
Chris@16
|
399 typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
Chris@16
|
400 typedef typename r1::type a1;
|
Chris@16
|
401 typedef typename r1::next n2;
|
Chris@16
|
402 typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
Chris@16
|
403 ///
|
Chris@16
|
404 typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
Chris@16
|
405 typedef typename r2::type a2;
|
Chris@16
|
406 typedef typename r2::next n3;
|
Chris@16
|
407 typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
Chris@16
|
408 ///
|
Chris@16
|
409 typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
Chris@16
|
410 typedef typename r3::type a3;
|
Chris@16
|
411 typedef typename r3::next n4;
|
Chris@16
|
412 typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
|
Chris@16
|
413 ///
|
Chris@16
|
414 typedef aux::replace_unnamed_arg< T4,n4 > r4;
|
Chris@16
|
415 typedef typename r4::type a4;
|
Chris@16
|
416 typedef typename r4::next n5;
|
Chris@16
|
417 typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
|
Chris@16
|
418 ///
|
Chris@16
|
419 typedef aux::replace_unnamed_arg< T5,n5 > r5;
|
Chris@16
|
420 typedef typename r5::type a5;
|
Chris@16
|
421 typedef typename r5::next n6;
|
Chris@16
|
422 typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
|
Chris@16
|
423 ///
|
Chris@16
|
424 public:
|
Chris@16
|
425 typedef typename apply_wrap5<
|
Chris@16
|
426 f_
|
Chris@16
|
427 , typename t1::type, typename t2::type, typename t3::type
|
Chris@16
|
428 , typename t4::type, typename t5::type
|
Chris@16
|
429 >::type type;
|
Chris@16
|
430
|
Chris@16
|
431 };
|
Chris@16
|
432 };
|
Chris@16
|
433
|
Chris@16
|
434 namespace aux {
|
Chris@16
|
435
|
Chris@16
|
436 template<
|
Chris@16
|
437 typename F, typename T1, typename T2, typename T3, typename T4
|
Chris@16
|
438 , typename T5, typename U1, typename U2, typename U3, typename U4
|
Chris@16
|
439 , typename U5
|
Chris@16
|
440 >
|
Chris@16
|
441 struct resolve_bind_arg<
|
Chris@16
|
442 bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
|
Chris@16
|
443 >
|
Chris@16
|
444 {
|
Chris@16
|
445 typedef bind5< F,T1,T2,T3,T4,T5 > f_;
|
Chris@16
|
446 typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
Chris@16
|
447 };
|
Chris@16
|
448
|
Chris@16
|
449 } // namespace aux
|
Chris@16
|
450
|
Chris@16
|
451 BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
|
Chris@16
|
452 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
|
Chris@16
|
453
|
Chris@16
|
454 /// primary template (not a specialization!)
|
Chris@16
|
455
|
Chris@16
|
456 template<
|
Chris@16
|
457 typename F, typename T1, typename T2, typename T3, typename T4
|
Chris@16
|
458 , typename T5
|
Chris@16
|
459 >
|
Chris@16
|
460 struct bind
|
Chris@16
|
461 : bind5< F,T1,T2,T3,T4,T5 >
|
Chris@16
|
462 {
|
Chris@16
|
463 };
|
Chris@16
|
464
|
Chris@16
|
465 /// if_/eval_if specializations
|
Chris@16
|
466 template< template< typename T1, typename T2, typename T3 > class F, typename Tag >
|
Chris@16
|
467 struct quote3;
|
Chris@16
|
468
|
Chris@16
|
469 template< typename T1, typename T2, typename T3 > struct if_;
|
Chris@16
|
470
|
Chris@16
|
471 template<
|
Chris@16
|
472 typename Tag, typename T1, typename T2, typename T3
|
Chris@16
|
473 >
|
Chris@16
|
474 struct bind3<
|
Chris@16
|
475 quote3< if_,Tag >
|
Chris@16
|
476 , T1, T2, T3
|
Chris@16
|
477 >
|
Chris@16
|
478 {
|
Chris@16
|
479 template<
|
Chris@16
|
480 typename U1 = na, typename U2 = na, typename U3 = na
|
Chris@16
|
481 , typename U4 = na, typename U5 = na
|
Chris@16
|
482 >
|
Chris@16
|
483 struct apply
|
Chris@16
|
484 {
|
Chris@16
|
485 private:
|
Chris@16
|
486 typedef mpl::arg<1> n1;
|
Chris@16
|
487 typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
Chris@16
|
488 typedef typename r1::type a1;
|
Chris@16
|
489 typedef typename r1::next n2;
|
Chris@16
|
490 typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
Chris@16
|
491 ///
|
Chris@16
|
492 typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
Chris@16
|
493 typedef typename r2::type a2;
|
Chris@16
|
494 typedef typename r2::next n3;
|
Chris@16
|
495 typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
Chris@16
|
496 ///
|
Chris@16
|
497 typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
Chris@16
|
498 typedef typename r3::type a3;
|
Chris@16
|
499 typedef typename r3::next n4;
|
Chris@16
|
500 typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
|
Chris@16
|
501 ///
|
Chris@16
|
502 typedef typename if_<
|
Chris@16
|
503 typename t1::type
|
Chris@16
|
504 , t2, t3
|
Chris@16
|
505 >::type f_;
|
Chris@16
|
506
|
Chris@16
|
507 public:
|
Chris@16
|
508 typedef typename f_::type type;
|
Chris@16
|
509 };
|
Chris@16
|
510 };
|
Chris@16
|
511
|
Chris@16
|
512 template<
|
Chris@16
|
513 template< typename T1, typename T2, typename T3 > class F, typename Tag
|
Chris@16
|
514 >
|
Chris@16
|
515 struct quote3;
|
Chris@16
|
516
|
Chris@16
|
517 template< typename T1, typename T2, typename T3 > struct eval_if;
|
Chris@16
|
518
|
Chris@16
|
519 template<
|
Chris@16
|
520 typename Tag, typename T1, typename T2, typename T3
|
Chris@16
|
521 >
|
Chris@16
|
522 struct bind3<
|
Chris@16
|
523 quote3< eval_if,Tag >
|
Chris@16
|
524 , T1, T2, T3
|
Chris@16
|
525 >
|
Chris@16
|
526 {
|
Chris@16
|
527 template<
|
Chris@16
|
528 typename U1 = na, typename U2 = na, typename U3 = na
|
Chris@16
|
529 , typename U4 = na, typename U5 = na
|
Chris@16
|
530 >
|
Chris@16
|
531 struct apply
|
Chris@16
|
532 {
|
Chris@16
|
533 private:
|
Chris@16
|
534 typedef mpl::arg<1> n1;
|
Chris@16
|
535 typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
Chris@16
|
536 typedef typename r1::type a1;
|
Chris@16
|
537 typedef typename r1::next n2;
|
Chris@16
|
538 typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
Chris@16
|
539 ///
|
Chris@16
|
540 typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
Chris@16
|
541 typedef typename r2::type a2;
|
Chris@16
|
542 typedef typename r2::next n3;
|
Chris@16
|
543 typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
Chris@16
|
544 ///
|
Chris@16
|
545 typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
Chris@16
|
546 typedef typename r3::type a3;
|
Chris@16
|
547 typedef typename r3::next n4;
|
Chris@16
|
548 typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
|
Chris@16
|
549 ///
|
Chris@16
|
550 typedef typename eval_if<
|
Chris@16
|
551 typename t1::type
|
Chris@16
|
552 , t2, t3
|
Chris@16
|
553 >::type f_;
|
Chris@16
|
554
|
Chris@16
|
555 public:
|
Chris@16
|
556 typedef typename f_::type type;
|
Chris@16
|
557 };
|
Chris@16
|
558 };
|
Chris@16
|
559
|
Chris@16
|
560 }}
|
Chris@16
|
561
|