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