1 | /*=============================================================================
|
---|
2 | Phoenix V1.2.1
|
---|
3 | Copyright (c) 2002 Joel de Guzman
|
---|
4 | Copyright (c) 2002-2003 Hartmut Kaiser
|
---|
5 |
|
---|
6 | Use, modification and distribution is subject to the Boost Software
|
---|
7 | License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
---|
8 | http://www.boost.org/LICENSE_1_0.txt)
|
---|
9 | ==============================================================================*/
|
---|
10 | #ifndef PHOENIX_TUPLEHELPERS_HPP
|
---|
11 | #define PHOENIX_TUPLEHELPERS_HPP
|
---|
12 |
|
---|
13 | ///////////////////////////////////////////////////////////////////////////////
|
---|
14 | #include <cassert>
|
---|
15 | #include <boost/spirit/phoenix/tuples.hpp>
|
---|
16 |
|
---|
17 | ///////////////////////////////////////////////////////////////////////////////
|
---|
18 | namespace phoenix
|
---|
19 | {
|
---|
20 |
|
---|
21 | ///////////////////////////////////////////////////////////////////////////////
|
---|
22 | //
|
---|
23 | // make_tuple template class
|
---|
24 | //
|
---|
25 | // This template class is used to calculate a tuple type required to hold
|
---|
26 | // the given template parameter type
|
---|
27 | //
|
---|
28 | ///////////////////////////////////////////////////////////////////////////////
|
---|
29 |
|
---|
30 | ///////////////////////////////////////////////////////////////////////////////
|
---|
31 | // normal (non-tuple types are wrapped into a tuple)
|
---|
32 | template <typename ResultT>
|
---|
33 | struct make_tuple {
|
---|
34 |
|
---|
35 | typedef tuple<ResultT> type;
|
---|
36 | };
|
---|
37 |
|
---|
38 | ///////////////////////////////////////////////////////////////////////////////
|
---|
39 | // nil_t is converted to an empty tuple type
|
---|
40 | template <>
|
---|
41 | struct make_tuple<nil_t> {
|
---|
42 |
|
---|
43 | typedef tuple<> type;
|
---|
44 | };
|
---|
45 |
|
---|
46 | ///////////////////////////////////////////////////////////////////////////////
|
---|
47 | // tuple types are left alone without any refactoring
|
---|
48 | template <
|
---|
49 | typename A, typename B, typename C
|
---|
50 | #if PHOENIX_LIMIT > 3
|
---|
51 | , typename D, typename E, typename F
|
---|
52 | #if PHOENIX_LIMIT > 6
|
---|
53 | , typename G, typename H, typename I
|
---|
54 | #if PHOENIX_LIMIT > 9
|
---|
55 | , typename J, typename K, typename L
|
---|
56 | #if PHOENIX_LIMIT > 12
|
---|
57 | , typename M, typename N, typename O
|
---|
58 | #endif
|
---|
59 | #endif
|
---|
60 | #endif
|
---|
61 | #endif
|
---|
62 | >
|
---|
63 | struct make_tuple<tuple<A, B, C
|
---|
64 | #if PHOENIX_LIMIT > 3
|
---|
65 | , D, E, F
|
---|
66 | #if PHOENIX_LIMIT > 6
|
---|
67 | , G, H, I
|
---|
68 | #if PHOENIX_LIMIT > 9
|
---|
69 | , J, K, L
|
---|
70 | #if PHOENIX_LIMIT > 12
|
---|
71 | , M, N, O
|
---|
72 | #endif
|
---|
73 | #endif
|
---|
74 | #endif
|
---|
75 | #endif
|
---|
76 | > > {
|
---|
77 |
|
---|
78 | // the tuple parameter itself is the required tuple type
|
---|
79 | typedef tuple<A, B, C
|
---|
80 | #if PHOENIX_LIMIT > 3
|
---|
81 | , D, E, F
|
---|
82 | #if PHOENIX_LIMIT > 6
|
---|
83 | , G, H, I
|
---|
84 | #if PHOENIX_LIMIT > 9
|
---|
85 | , J, K, L
|
---|
86 | #if PHOENIX_LIMIT > 12
|
---|
87 | , M, N, O
|
---|
88 | #endif
|
---|
89 | #endif
|
---|
90 | #endif
|
---|
91 | #endif
|
---|
92 | > type;
|
---|
93 | };
|
---|
94 |
|
---|
95 | ///////////////////////////////////////////////////////////////////////////////
|
---|
96 | //
|
---|
97 | // concat_tuple type computer
|
---|
98 | //
|
---|
99 | // This class returns the type of a tuple, which is constructed by
|
---|
100 | // concatenating a tuple with a given type
|
---|
101 | //
|
---|
102 | ///////////////////////////////////////////////////////////////////////////////
|
---|
103 | template <typename TupleT, typename AppendT>
|
---|
104 | struct concat_tuple;
|
---|
105 |
|
---|
106 | ///////////////////////////////////////////////////////////////////////////////
|
---|
107 | //
|
---|
108 | // concat tuple <0 member> class
|
---|
109 | //
|
---|
110 | ///////////////////////////////////////////////////////////////////////////////
|
---|
111 | template <typename AppendT>
|
---|
112 | struct concat_tuple<tuple<>, AppendT> {
|
---|
113 |
|
---|
114 | typedef tuple<AppendT> type;
|
---|
115 | };
|
---|
116 |
|
---|
117 | template <>
|
---|
118 | struct concat_tuple<tuple<>, nil_t> {
|
---|
119 |
|
---|
120 | typedef tuple<> type;
|
---|
121 | };
|
---|
122 |
|
---|
123 | ///////////////////////////////////////////////////////////////////////////////
|
---|
124 | //
|
---|
125 | // concat tuple <1 member> class
|
---|
126 | //
|
---|
127 | ///////////////////////////////////////////////////////////////////////////////
|
---|
128 | template <typename A, typename AppendT>
|
---|
129 | struct concat_tuple<tuple<A>, AppendT> {
|
---|
130 |
|
---|
131 | typedef tuple<A, AppendT> type;
|
---|
132 | };
|
---|
133 |
|
---|
134 | template <typename A>
|
---|
135 | struct concat_tuple<tuple<A>, nil_t> {
|
---|
136 |
|
---|
137 | typedef tuple<A> type;
|
---|
138 | };
|
---|
139 |
|
---|
140 | ///////////////////////////////////////////////////////////////////////////////
|
---|
141 | //
|
---|
142 | // concat tuple <2 member> class
|
---|
143 | //
|
---|
144 | ///////////////////////////////////////////////////////////////////////////////
|
---|
145 | template <typename A, typename B, typename AppendT>
|
---|
146 | struct concat_tuple<tuple<A, B>, AppendT> {
|
---|
147 |
|
---|
148 | typedef tuple<A, B, AppendT> type;
|
---|
149 | };
|
---|
150 |
|
---|
151 | template <typename A, typename B>
|
---|
152 | struct concat_tuple<tuple<A, B>, nil_t> {
|
---|
153 |
|
---|
154 | typedef tuple<A, B> type;
|
---|
155 | };
|
---|
156 |
|
---|
157 | #if PHOENIX_LIMIT > 3
|
---|
158 | ///////////////////////////////////////////////////////////////////////////////
|
---|
159 | //
|
---|
160 | // concat tuple <3 member> class
|
---|
161 | //
|
---|
162 | ///////////////////////////////////////////////////////////////////////////////
|
---|
163 | template <
|
---|
164 | typename A, typename B, typename C,
|
---|
165 | typename AppendT
|
---|
166 | >
|
---|
167 | struct concat_tuple<tuple<A, B, C>, AppendT> {
|
---|
168 |
|
---|
169 | typedef tuple<A, B, C, AppendT> type;
|
---|
170 | };
|
---|
171 |
|
---|
172 | template <
|
---|
173 | typename A, typename B, typename C
|
---|
174 | >
|
---|
175 | struct concat_tuple<tuple<A, B, C>, nil_t> {
|
---|
176 |
|
---|
177 | typedef tuple<A, B, C> type;
|
---|
178 | };
|
---|
179 |
|
---|
180 | ///////////////////////////////////////////////////////////////////////////////
|
---|
181 | //
|
---|
182 | // concat tuple <4 member> class
|
---|
183 | //
|
---|
184 | ///////////////////////////////////////////////////////////////////////////////
|
---|
185 | template <
|
---|
186 | typename A, typename B, typename C, typename D,
|
---|
187 | typename AppendT
|
---|
188 | >
|
---|
189 | struct concat_tuple<tuple<A, B, C, D>, AppendT> {
|
---|
190 |
|
---|
191 | typedef tuple<A, B, C, D, AppendT> type;
|
---|
192 | };
|
---|
193 |
|
---|
194 | template <
|
---|
195 | typename A, typename B, typename C, typename D
|
---|
196 | >
|
---|
197 | struct concat_tuple<tuple<A, B, C, D>, nil_t> {
|
---|
198 |
|
---|
199 | typedef tuple<A, B, C, D> type;
|
---|
200 | };
|
---|
201 |
|
---|
202 | ///////////////////////////////////////////////////////////////////////////////
|
---|
203 | //
|
---|
204 | // concat tuple <5 member> class
|
---|
205 | //
|
---|
206 | ///////////////////////////////////////////////////////////////////////////////
|
---|
207 | template <
|
---|
208 | typename A, typename B, typename C, typename D, typename E,
|
---|
209 | typename AppendT
|
---|
210 | >
|
---|
211 | struct concat_tuple<tuple<A, B, C, D, E>, AppendT> {
|
---|
212 |
|
---|
213 | typedef tuple<A, B, C, D, E, AppendT> type;
|
---|
214 | };
|
---|
215 |
|
---|
216 | template <
|
---|
217 | typename A, typename B, typename C, typename D, typename E
|
---|
218 | >
|
---|
219 | struct concat_tuple<tuple<A, B, C, D, E>, nil_t> {
|
---|
220 |
|
---|
221 | typedef tuple<A, B, C, D, E> type;
|
---|
222 | };
|
---|
223 |
|
---|
224 | #if PHOENIX_LIMIT > 6
|
---|
225 | ///////////////////////////////////////////////////////////////////////////////
|
---|
226 | //
|
---|
227 | // concat tuple <6 member> class
|
---|
228 | //
|
---|
229 | ///////////////////////////////////////////////////////////////////////////////
|
---|
230 | template <
|
---|
231 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
232 | typename AppendT
|
---|
233 | >
|
---|
234 | struct concat_tuple<tuple<A, B, C, D, E, F>, AppendT> {
|
---|
235 |
|
---|
236 | typedef tuple<A, B, C, D, E, F, AppendT> type;
|
---|
237 | };
|
---|
238 |
|
---|
239 | template <
|
---|
240 | typename A, typename B, typename C, typename D, typename E, typename F
|
---|
241 | >
|
---|
242 | struct concat_tuple<tuple<A, B, C, D, E, F>, nil_t> {
|
---|
243 |
|
---|
244 | typedef tuple<A, B, C, D, E, F> type;
|
---|
245 | };
|
---|
246 |
|
---|
247 | ///////////////////////////////////////////////////////////////////////////////
|
---|
248 | //
|
---|
249 | // concat tuple <7 member> class
|
---|
250 | //
|
---|
251 | ///////////////////////////////////////////////////////////////////////////////
|
---|
252 | template <
|
---|
253 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
254 | typename G,
|
---|
255 | typename AppendT
|
---|
256 | >
|
---|
257 | struct concat_tuple<tuple<A, B, C, D, E, F, G>, AppendT> {
|
---|
258 |
|
---|
259 | typedef tuple<A, B, C, D, E, F, G, AppendT> type;
|
---|
260 | };
|
---|
261 |
|
---|
262 | template <
|
---|
263 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
264 | typename G
|
---|
265 | >
|
---|
266 | struct concat_tuple<tuple<A, B, C, D, E, F, G>, nil_t> {
|
---|
267 |
|
---|
268 | typedef tuple<A, B, C, D, E, F, G> type;
|
---|
269 | };
|
---|
270 |
|
---|
271 | ///////////////////////////////////////////////////////////////////////////////
|
---|
272 | //
|
---|
273 | // concat tuple <8 member> class
|
---|
274 | //
|
---|
275 | ///////////////////////////////////////////////////////////////////////////////
|
---|
276 | template <
|
---|
277 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
278 | typename G, typename H,
|
---|
279 | typename AppendT
|
---|
280 | >
|
---|
281 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H>, AppendT> {
|
---|
282 |
|
---|
283 | typedef tuple<A, B, C, D, E, F, G, H, AppendT> type;
|
---|
284 | };
|
---|
285 |
|
---|
286 | template <
|
---|
287 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
288 | typename G, typename H
|
---|
289 | >
|
---|
290 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H>, nil_t> {
|
---|
291 |
|
---|
292 | typedef tuple<A, B, C, D, E, F, G, H> type;
|
---|
293 | };
|
---|
294 |
|
---|
295 | #if PHOENIX_LIMIT > 9
|
---|
296 | ///////////////////////////////////////////////////////////////////////////////
|
---|
297 | //
|
---|
298 | // concat tuple <9 member> class
|
---|
299 | //
|
---|
300 | ///////////////////////////////////////////////////////////////////////////////
|
---|
301 | template <
|
---|
302 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
303 | typename G, typename H, typename I,
|
---|
304 | typename AppendT
|
---|
305 | >
|
---|
306 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H, I>, AppendT> {
|
---|
307 |
|
---|
308 | typedef tuple<A, B, C, D, E, F, G, H, I, AppendT> type;
|
---|
309 | };
|
---|
310 |
|
---|
311 | template <
|
---|
312 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
313 | typename G, typename H, typename I
|
---|
314 | >
|
---|
315 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H, I>, nil_t> {
|
---|
316 |
|
---|
317 | typedef tuple<A, B, C, D, E, F, G, H, I> type;
|
---|
318 | };
|
---|
319 |
|
---|
320 | ///////////////////////////////////////////////////////////////////////////////
|
---|
321 | //
|
---|
322 | // concat tuple <10 member> class
|
---|
323 | //
|
---|
324 | ///////////////////////////////////////////////////////////////////////////////
|
---|
325 | template <
|
---|
326 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
327 | typename G, typename H, typename I, typename J,
|
---|
328 | typename AppendT
|
---|
329 | >
|
---|
330 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H, I, J>, AppendT> {
|
---|
331 |
|
---|
332 | typedef tuple<A, B, C, D, E, F, G, H, I, J, AppendT> type;
|
---|
333 | };
|
---|
334 |
|
---|
335 | template <
|
---|
336 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
337 | typename G, typename H, typename I, typename J
|
---|
338 | >
|
---|
339 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H, I, J>, nil_t> {
|
---|
340 |
|
---|
341 | typedef tuple<A, B, C, D, E, F, G, H, I, J> type;
|
---|
342 | };
|
---|
343 |
|
---|
344 | ///////////////////////////////////////////////////////////////////////////////
|
---|
345 | //
|
---|
346 | // concat tuple <11 member> class
|
---|
347 | //
|
---|
348 | ///////////////////////////////////////////////////////////////////////////////
|
---|
349 | template <
|
---|
350 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
351 | typename G, typename H, typename I, typename J, typename K,
|
---|
352 | typename AppendT
|
---|
353 | >
|
---|
354 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H, I, J, K>, AppendT> {
|
---|
355 |
|
---|
356 | typedef tuple<A, B, C, D, E, F, G, H, I, J, K, AppendT> type;
|
---|
357 | };
|
---|
358 |
|
---|
359 | template <
|
---|
360 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
361 | typename G, typename H, typename I, typename J, typename K
|
---|
362 | >
|
---|
363 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H, I, J, K>, nil_t> {
|
---|
364 |
|
---|
365 | typedef tuple<A, B, C, D, E, F, G, H, I, J, K> type;
|
---|
366 | };
|
---|
367 |
|
---|
368 | #if PHOENIX_LIMIT > 12
|
---|
369 | ///////////////////////////////////////////////////////////////////////////////
|
---|
370 | //
|
---|
371 | // concat tuple <12 member> class
|
---|
372 | //
|
---|
373 | ///////////////////////////////////////////////////////////////////////////////
|
---|
374 | template <
|
---|
375 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
376 | typename G, typename H, typename I, typename J, typename K, typename L,
|
---|
377 | typename AppendT
|
---|
378 | >
|
---|
379 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H, I, J, K, L>, AppendT> {
|
---|
380 |
|
---|
381 | typedef tuple<A, B, C, D, E, F, G, H, I, J, K, L, AppendT> type;
|
---|
382 | };
|
---|
383 |
|
---|
384 | template <
|
---|
385 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
386 | typename G, typename H, typename I, typename J, typename K, typename L
|
---|
387 | >
|
---|
388 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H, I, J, K, L>, nil_t> {
|
---|
389 |
|
---|
390 | typedef tuple<A, B, C, D, E, F, G, H, I, J, K, L> type;
|
---|
391 | };
|
---|
392 |
|
---|
393 | ///////////////////////////////////////////////////////////////////////////////
|
---|
394 | //
|
---|
395 | // concat tuple <13 member> class
|
---|
396 | //
|
---|
397 | ///////////////////////////////////////////////////////////////////////////////
|
---|
398 | template <
|
---|
399 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
400 | typename G, typename H, typename I, typename J, typename K, typename L,
|
---|
401 | typename M,
|
---|
402 | typename AppendT
|
---|
403 | >
|
---|
404 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H, I, J, K, L, M>, AppendT> {
|
---|
405 |
|
---|
406 | typedef tuple<A, B, C, D, E, F, G, H, I, J, K, L, M, AppendT> type;
|
---|
407 | };
|
---|
408 |
|
---|
409 | template <
|
---|
410 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
411 | typename G, typename H, typename I, typename J, typename K, typename L,
|
---|
412 | typename M
|
---|
413 | >
|
---|
414 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H, I, J, K, L, M>, nil_t> {
|
---|
415 |
|
---|
416 | typedef tuple<A, B, C, D, E, F, G, H, I, J, K, L, M> type;
|
---|
417 | };
|
---|
418 |
|
---|
419 | ///////////////////////////////////////////////////////////////////////////////
|
---|
420 | //
|
---|
421 | // concat tuple <14 member> class
|
---|
422 | //
|
---|
423 | ///////////////////////////////////////////////////////////////////////////////
|
---|
424 | template <
|
---|
425 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
426 | typename G, typename H, typename I, typename J, typename K, typename L,
|
---|
427 | typename M, typename N,
|
---|
428 | typename AppendT
|
---|
429 | >
|
---|
430 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H, I, J, K, L, M, N>, AppendT> {
|
---|
431 |
|
---|
432 | typedef tuple<A, B, C, D, E, F, G, H, I, J, K, L, M, N, AppendT> type;
|
---|
433 | };
|
---|
434 |
|
---|
435 | template <
|
---|
436 | typename A, typename B, typename C, typename D, typename E, typename F,
|
---|
437 | typename G, typename H, typename I, typename J, typename K, typename L,
|
---|
438 | typename M, typename N
|
---|
439 | >
|
---|
440 | struct concat_tuple<tuple<A, B, C, D, E, F, G, H, I, J, K, L, M, N>, nil_t> {
|
---|
441 |
|
---|
442 | typedef tuple<A, B, C, D, E, F, G, H, I, J, K, L, M, N> type;
|
---|
443 | };
|
---|
444 |
|
---|
445 | #endif
|
---|
446 | #endif
|
---|
447 | #endif
|
---|
448 | #endif
|
---|
449 |
|
---|
450 | ///////////////////////////////////////////////////////////////////////////////
|
---|
451 | //
|
---|
452 | // concat_tuples type computer
|
---|
453 | //
|
---|
454 | // This template class returns the type of a tuple built from the
|
---|
455 | // concatenation of two given tuples.
|
---|
456 | //
|
---|
457 | ///////////////////////////////////////////////////////////////////////////////
|
---|
458 | template <typename TupleT1, typename TupleT2, int N, typename AppendT>
|
---|
459 | struct concat_tuple_element {
|
---|
460 |
|
---|
461 | typedef
|
---|
462 | typename concat_tuple_element<
|
---|
463 | typename concat_tuple<TupleT1, AppendT>::type, TupleT2, N+1,
|
---|
464 | typename tuple_element<N+1, TupleT2>::type
|
---|
465 | >::type
|
---|
466 | type;
|
---|
467 | };
|
---|
468 |
|
---|
469 | template <typename TupleT1, typename TupleT2, int N>
|
---|
470 | struct concat_tuple_element<TupleT1, TupleT2, N, nil_t> {
|
---|
471 |
|
---|
472 | typedef TupleT1 type;
|
---|
473 | };
|
---|
474 |
|
---|
475 | template <typename TupleT1, typename TupleT2>
|
---|
476 | struct concat_tuples {
|
---|
477 |
|
---|
478 | typedef
|
---|
479 | typename concat_tuple_element<
|
---|
480 | TupleT1, TupleT2, 0,
|
---|
481 | typename tuple_element<0, TupleT2>::type
|
---|
482 | >::type
|
---|
483 | type;
|
---|
484 | };
|
---|
485 |
|
---|
486 | ///////////////////////////////////////////////////////////////////////////////
|
---|
487 | //
|
---|
488 | // convert_actors template function
|
---|
489 | //
|
---|
490 | // The convert_actors template functions constructs a new tuple object
|
---|
491 | // composed of the elements returned by the actors contained in the
|
---|
492 | // input tuple. (i.e. the given tuple type 'actor_tuple' contains a set
|
---|
493 | // of actors to evaluate and the resulting tuple contains the results of
|
---|
494 | // evaluating the actors.)
|
---|
495 | //
|
---|
496 | ///////////////////////////////////////////////////////////////////////////////
|
---|
497 | template <typename ActorT, typename TupleT>
|
---|
498 | struct actor_result; // forward declaration
|
---|
499 |
|
---|
500 | namespace impl
|
---|
501 | {
|
---|
502 | template <unsigned N>
|
---|
503 | struct convert_actors_ {};
|
---|
504 | }
|
---|
505 |
|
---|
506 | template <typename TupleResultT, typename ActorTupleT>
|
---|
507 | TupleResultT
|
---|
508 | convert_actors(ActorTupleT const& actor_tuple)
|
---|
509 | {
|
---|
510 | BOOST_STATIC_ASSERT(ActorTupleT::length <= TupleResultT::length);
|
---|
511 | BOOST_STATIC_CONSTANT(int, length = TupleResultT::length);
|
---|
512 | return impl::convert_actors_<length>
|
---|
513 | ::template apply<TupleResultT, ActorTupleT>::do_(actor_tuple);
|
---|
514 | }
|
---|
515 |
|
---|
516 | namespace impl
|
---|
517 | {
|
---|
518 | template <int N, typename TupleResultT, typename ActorTupleT>
|
---|
519 | struct convert_actor
|
---|
520 | {
|
---|
521 | typedef typename tuple_element<N, TupleResultT>::type type;
|
---|
522 |
|
---|
523 | template <bool C>
|
---|
524 | struct is_default_t {};
|
---|
525 | typedef is_default_t<true> is_default;
|
---|
526 | typedef is_default_t<false> is_not_default;
|
---|
527 |
|
---|
528 | static type
|
---|
529 | actor_element(ActorTupleT const& /*actor_tuple*/, is_default)
|
---|
530 | {
|
---|
531 | return type(); // default construct
|
---|
532 | }
|
---|
533 |
|
---|
534 | static type
|
---|
535 | actor_element(ActorTupleT const& actor_tuple, is_not_default)
|
---|
536 | {
|
---|
537 | BOOST_STATIC_ASSERT(ActorTupleT::length <= TupleResultT::length);
|
---|
538 | return actor_tuple[tuple_index<N>()](); // apply the actor
|
---|
539 | }
|
---|
540 |
|
---|
541 | static type
|
---|
542 | do_(ActorTupleT const& actor_tuple)
|
---|
543 | {
|
---|
544 | return actor_element(
|
---|
545 | actor_tuple, is_default_t<(N >= ActorTupleT::length)>());
|
---|
546 | }
|
---|
547 | };
|
---|
548 |
|
---|
549 | ///////////////////////////////////////
|
---|
550 | template <>
|
---|
551 | struct convert_actors_<1>
|
---|
552 | {
|
---|
553 | template <typename TupleResultT, typename ActorTupleT>
|
---|
554 | struct apply
|
---|
555 | {
|
---|
556 | static TupleResultT
|
---|
557 | do_(ActorTupleT const& actor_tuple)
|
---|
558 | {
|
---|
559 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
560 |
|
---|
561 | return TupleResultT(
|
---|
562 | converter0::do_(actor_tuple)
|
---|
563 | );
|
---|
564 | }
|
---|
565 | };
|
---|
566 | };
|
---|
567 |
|
---|
568 | ///////////////////////////////////////
|
---|
569 | template <>
|
---|
570 | struct convert_actors_<2>
|
---|
571 | {
|
---|
572 | template <typename TupleResultT, typename ActorTupleT>
|
---|
573 | struct apply
|
---|
574 | {
|
---|
575 | static TupleResultT
|
---|
576 | do_(ActorTupleT const& actor_tuple)
|
---|
577 | {
|
---|
578 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
579 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
580 |
|
---|
581 | using namespace tuple_index_names;
|
---|
582 | return TupleResultT(
|
---|
583 | converter0::do_(actor_tuple)
|
---|
584 | , converter1::do_(actor_tuple)
|
---|
585 | );
|
---|
586 | }
|
---|
587 | };
|
---|
588 | };
|
---|
589 |
|
---|
590 | ///////////////////////////////////////
|
---|
591 | template <>
|
---|
592 | struct convert_actors_<3>
|
---|
593 | {
|
---|
594 | template <typename TupleResultT, typename ActorTupleT>
|
---|
595 | struct apply
|
---|
596 | {
|
---|
597 | static TupleResultT
|
---|
598 | do_(ActorTupleT const& actor_tuple)
|
---|
599 | {
|
---|
600 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
601 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
602 | typedef impl::convert_actor<2, TupleResultT, ActorTupleT> converter2;
|
---|
603 |
|
---|
604 | using namespace tuple_index_names;
|
---|
605 | return TupleResultT(
|
---|
606 | converter0::do_(actor_tuple)
|
---|
607 | , converter1::do_(actor_tuple)
|
---|
608 | , converter2::do_(actor_tuple)
|
---|
609 | );
|
---|
610 | }
|
---|
611 | };
|
---|
612 | };
|
---|
613 |
|
---|
614 | #if PHOENIX_LIMIT > 3
|
---|
615 |
|
---|
616 | /////////////////////////////////////
|
---|
617 | template <>
|
---|
618 | struct convert_actors_<4>
|
---|
619 | {
|
---|
620 | template <typename TupleResultT, typename ActorTupleT>
|
---|
621 | struct apply
|
---|
622 | {
|
---|
623 | static TupleResultT
|
---|
624 | do_(ActorTupleT const& actor_tuple)
|
---|
625 | {
|
---|
626 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
627 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
628 | typedef impl::convert_actor<2, TupleResultT, ActorTupleT> converter2;
|
---|
629 | typedef impl::convert_actor<3, TupleResultT, ActorTupleT> converter3;
|
---|
630 |
|
---|
631 | using namespace tuple_index_names;
|
---|
632 | return TupleResultT(
|
---|
633 | converter0::do_(actor_tuple)
|
---|
634 | , converter1::do_(actor_tuple)
|
---|
635 | , converter2::do_(actor_tuple)
|
---|
636 | , converter3::do_(actor_tuple)
|
---|
637 | );
|
---|
638 | }
|
---|
639 | };
|
---|
640 | };
|
---|
641 |
|
---|
642 | /////////////////////////////////////
|
---|
643 | template <>
|
---|
644 | struct convert_actors_<5>
|
---|
645 | {
|
---|
646 | template <typename TupleResultT, typename ActorTupleT>
|
---|
647 | struct apply
|
---|
648 | {
|
---|
649 | static TupleResultT
|
---|
650 | do_(ActorTupleT const& actor_tuple)
|
---|
651 | {
|
---|
652 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
653 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
654 | typedef impl::convert_actor<2, TupleResultT, ActorTupleT> converter2;
|
---|
655 | typedef impl::convert_actor<3, TupleResultT, ActorTupleT> converter3;
|
---|
656 | typedef impl::convert_actor<4, TupleResultT, ActorTupleT> converter4;
|
---|
657 |
|
---|
658 | using namespace tuple_index_names;
|
---|
659 | return TupleResultT(
|
---|
660 | converter0::do_(actor_tuple)
|
---|
661 | , converter1::do_(actor_tuple)
|
---|
662 | , converter2::do_(actor_tuple)
|
---|
663 | , converter3::do_(actor_tuple)
|
---|
664 | , converter4::do_(actor_tuple)
|
---|
665 | );
|
---|
666 | }
|
---|
667 | };
|
---|
668 | };
|
---|
669 |
|
---|
670 | /////////////////////////////////////
|
---|
671 | template <>
|
---|
672 | struct convert_actors_<6>
|
---|
673 | {
|
---|
674 | template <typename TupleResultT, typename ActorTupleT>
|
---|
675 | struct apply
|
---|
676 | {
|
---|
677 | static TupleResultT
|
---|
678 | do_(ActorTupleT const& actor_tuple)
|
---|
679 | {
|
---|
680 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
681 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
682 | typedef impl::convert_actor<2, TupleResultT, ActorTupleT> converter2;
|
---|
683 | typedef impl::convert_actor<3, TupleResultT, ActorTupleT> converter3;
|
---|
684 | typedef impl::convert_actor<4, TupleResultT, ActorTupleT> converter4;
|
---|
685 | typedef impl::convert_actor<5, TupleResultT, ActorTupleT> converter5;
|
---|
686 |
|
---|
687 | using namespace tuple_index_names;
|
---|
688 | return TupleResultT(
|
---|
689 | converter0::do_(actor_tuple)
|
---|
690 | , converter1::do_(actor_tuple)
|
---|
691 | , converter2::do_(actor_tuple)
|
---|
692 | , converter3::do_(actor_tuple)
|
---|
693 | , converter4::do_(actor_tuple)
|
---|
694 | , converter5::do_(actor_tuple)
|
---|
695 | );
|
---|
696 | }
|
---|
697 | };
|
---|
698 | };
|
---|
699 |
|
---|
700 | #if PHOENIX_LIMIT > 6
|
---|
701 |
|
---|
702 | /////////////////////////////////////
|
---|
703 | template <>
|
---|
704 | struct convert_actors_<7>
|
---|
705 | {
|
---|
706 | template <typename TupleResultT, typename ActorTupleT>
|
---|
707 | struct apply
|
---|
708 | {
|
---|
709 | static TupleResultT
|
---|
710 | do_(ActorTupleT const& actor_tuple)
|
---|
711 | {
|
---|
712 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
713 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
714 | typedef impl::convert_actor<2, TupleResultT, ActorTupleT> converter2;
|
---|
715 | typedef impl::convert_actor<3, TupleResultT, ActorTupleT> converter3;
|
---|
716 | typedef impl::convert_actor<4, TupleResultT, ActorTupleT> converter4;
|
---|
717 | typedef impl::convert_actor<5, TupleResultT, ActorTupleT> converter5;
|
---|
718 | typedef impl::convert_actor<6, TupleResultT, ActorTupleT> converter6;
|
---|
719 |
|
---|
720 | using namespace tuple_index_names;
|
---|
721 | return TupleResultT(
|
---|
722 | converter0::do_(actor_tuple)
|
---|
723 | , converter1::do_(actor_tuple)
|
---|
724 | , converter2::do_(actor_tuple)
|
---|
725 | , converter3::do_(actor_tuple)
|
---|
726 | , converter4::do_(actor_tuple)
|
---|
727 | , converter5::do_(actor_tuple)
|
---|
728 | , converter6::do_(actor_tuple)
|
---|
729 | );
|
---|
730 | }
|
---|
731 | };
|
---|
732 | };
|
---|
733 |
|
---|
734 | /////////////////////////////////////
|
---|
735 | template <>
|
---|
736 | struct convert_actors_<8>
|
---|
737 | {
|
---|
738 | template <typename TupleResultT, typename ActorTupleT>
|
---|
739 | struct apply
|
---|
740 | {
|
---|
741 | static TupleResultT
|
---|
742 | do_(ActorTupleT const& actor_tuple)
|
---|
743 | {
|
---|
744 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
745 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
746 | typedef impl::convert_actor<2, TupleResultT, ActorTupleT> converter2;
|
---|
747 | typedef impl::convert_actor<3, TupleResultT, ActorTupleT> converter3;
|
---|
748 | typedef impl::convert_actor<4, TupleResultT, ActorTupleT> converter4;
|
---|
749 | typedef impl::convert_actor<5, TupleResultT, ActorTupleT> converter5;
|
---|
750 | typedef impl::convert_actor<6, TupleResultT, ActorTupleT> converter6;
|
---|
751 | typedef impl::convert_actor<7, TupleResultT, ActorTupleT> converter7;
|
---|
752 |
|
---|
753 | using namespace tuple_index_names;
|
---|
754 | return TupleResultT(
|
---|
755 | converter0::do_(actor_tuple)
|
---|
756 | , converter1::do_(actor_tuple)
|
---|
757 | , converter2::do_(actor_tuple)
|
---|
758 | , converter3::do_(actor_tuple)
|
---|
759 | , converter4::do_(actor_tuple)
|
---|
760 | , converter5::do_(actor_tuple)
|
---|
761 | , converter6::do_(actor_tuple)
|
---|
762 | , converter7::do_(actor_tuple)
|
---|
763 | );
|
---|
764 | }
|
---|
765 | };
|
---|
766 | };
|
---|
767 |
|
---|
768 | /////////////////////////////////////
|
---|
769 | template <>
|
---|
770 | struct convert_actors_<9>
|
---|
771 | {
|
---|
772 | template <typename TupleResultT, typename ActorTupleT>
|
---|
773 | struct apply
|
---|
774 | {
|
---|
775 | static TupleResultT
|
---|
776 | do_(ActorTupleT const& actor_tuple)
|
---|
777 | {
|
---|
778 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
779 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
780 | typedef impl::convert_actor<2, TupleResultT, ActorTupleT> converter2;
|
---|
781 | typedef impl::convert_actor<3, TupleResultT, ActorTupleT> converter3;
|
---|
782 | typedef impl::convert_actor<4, TupleResultT, ActorTupleT> converter4;
|
---|
783 | typedef impl::convert_actor<5, TupleResultT, ActorTupleT> converter5;
|
---|
784 | typedef impl::convert_actor<6, TupleResultT, ActorTupleT> converter6;
|
---|
785 | typedef impl::convert_actor<7, TupleResultT, ActorTupleT> converter7;
|
---|
786 | typedef impl::convert_actor<8, TupleResultT, ActorTupleT> converter8;
|
---|
787 |
|
---|
788 | using namespace tuple_index_names;
|
---|
789 | return TupleResultT(
|
---|
790 | converter0::do_(actor_tuple)
|
---|
791 | , converter1::do_(actor_tuple)
|
---|
792 | , converter2::do_(actor_tuple)
|
---|
793 | , converter3::do_(actor_tuple)
|
---|
794 | , converter4::do_(actor_tuple)
|
---|
795 | , converter5::do_(actor_tuple)
|
---|
796 | , converter6::do_(actor_tuple)
|
---|
797 | , converter7::do_(actor_tuple)
|
---|
798 | , converter8::do_(actor_tuple)
|
---|
799 | );
|
---|
800 | }
|
---|
801 | };
|
---|
802 | };
|
---|
803 |
|
---|
804 | #if PHOENIX_LIMIT > 9
|
---|
805 |
|
---|
806 | /////////////////////////////////////
|
---|
807 | template <>
|
---|
808 | struct convert_actors_<10>
|
---|
809 | {
|
---|
810 | template <typename TupleResultT, typename ActorTupleT>
|
---|
811 | struct apply
|
---|
812 | {
|
---|
813 | static TupleResultT
|
---|
814 | do_(ActorTupleT const& actor_tuple)
|
---|
815 | {
|
---|
816 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
817 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
818 | typedef impl::convert_actor<2, TupleResultT, ActorTupleT> converter2;
|
---|
819 | typedef impl::convert_actor<3, TupleResultT, ActorTupleT> converter3;
|
---|
820 | typedef impl::convert_actor<4, TupleResultT, ActorTupleT> converter4;
|
---|
821 | typedef impl::convert_actor<5, TupleResultT, ActorTupleT> converter5;
|
---|
822 | typedef impl::convert_actor<6, TupleResultT, ActorTupleT> converter6;
|
---|
823 | typedef impl::convert_actor<7, TupleResultT, ActorTupleT> converter7;
|
---|
824 | typedef impl::convert_actor<8, TupleResultT, ActorTupleT> converter8;
|
---|
825 | typedef impl::convert_actor<9, TupleResultT, ActorTupleT> converter9;
|
---|
826 |
|
---|
827 | using namespace tuple_index_names;
|
---|
828 | return TupleResultT(
|
---|
829 | converter0::do_(actor_tuple)
|
---|
830 | , converter1::do_(actor_tuple)
|
---|
831 | , converter2::do_(actor_tuple)
|
---|
832 | , converter3::do_(actor_tuple)
|
---|
833 | , converter4::do_(actor_tuple)
|
---|
834 | , converter5::do_(actor_tuple)
|
---|
835 | , converter6::do_(actor_tuple)
|
---|
836 | , converter7::do_(actor_tuple)
|
---|
837 | , converter8::do_(actor_tuple)
|
---|
838 | , converter9::do_(actor_tuple)
|
---|
839 | );
|
---|
840 | }
|
---|
841 | };
|
---|
842 | };
|
---|
843 |
|
---|
844 | /////////////////////////////////////
|
---|
845 | template <>
|
---|
846 | struct convert_actors_<11>
|
---|
847 | {
|
---|
848 | template <typename TupleResultT, typename ActorTupleT>
|
---|
849 | struct apply
|
---|
850 | {
|
---|
851 | static TupleResultT
|
---|
852 | do_(ActorTupleT const& actor_tuple)
|
---|
853 | {
|
---|
854 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
855 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
856 | typedef impl::convert_actor<2, TupleResultT, ActorTupleT> converter2;
|
---|
857 | typedef impl::convert_actor<3, TupleResultT, ActorTupleT> converter3;
|
---|
858 | typedef impl::convert_actor<4, TupleResultT, ActorTupleT> converter4;
|
---|
859 | typedef impl::convert_actor<5, TupleResultT, ActorTupleT> converter5;
|
---|
860 | typedef impl::convert_actor<6, TupleResultT, ActorTupleT> converter6;
|
---|
861 | typedef impl::convert_actor<7, TupleResultT, ActorTupleT> converter7;
|
---|
862 | typedef impl::convert_actor<8, TupleResultT, ActorTupleT> converter8;
|
---|
863 | typedef impl::convert_actor<9, TupleResultT, ActorTupleT> converter9;
|
---|
864 | typedef impl::convert_actor<10, TupleResultT, ActorTupleT> converter10;
|
---|
865 |
|
---|
866 | using namespace tuple_index_names;
|
---|
867 | return TupleResultT(
|
---|
868 | converter0::do_(actor_tuple)
|
---|
869 | , converter1::do_(actor_tuple)
|
---|
870 | , converter2::do_(actor_tuple)
|
---|
871 | , converter3::do_(actor_tuple)
|
---|
872 | , converter4::do_(actor_tuple)
|
---|
873 | , converter5::do_(actor_tuple)
|
---|
874 | , converter6::do_(actor_tuple)
|
---|
875 | , converter7::do_(actor_tuple)
|
---|
876 | , converter8::do_(actor_tuple)
|
---|
877 | , converter9::do_(actor_tuple)
|
---|
878 | , converter10::do_(actor_tuple)
|
---|
879 | );
|
---|
880 | }
|
---|
881 | };
|
---|
882 | };
|
---|
883 |
|
---|
884 | /////////////////////////////////////
|
---|
885 | template <>
|
---|
886 | struct convert_actors_<12>
|
---|
887 | {
|
---|
888 | template <typename TupleResultT, typename ActorTupleT>
|
---|
889 | struct apply
|
---|
890 | {
|
---|
891 | static TupleResultT
|
---|
892 | do_(ActorTupleT const& actor_tuple)
|
---|
893 | {
|
---|
894 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
895 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
896 | typedef impl::convert_actor<2, TupleResultT, ActorTupleT> converter2;
|
---|
897 | typedef impl::convert_actor<3, TupleResultT, ActorTupleT> converter3;
|
---|
898 | typedef impl::convert_actor<4, TupleResultT, ActorTupleT> converter4;
|
---|
899 | typedef impl::convert_actor<5, TupleResultT, ActorTupleT> converter5;
|
---|
900 | typedef impl::convert_actor<6, TupleResultT, ActorTupleT> converter6;
|
---|
901 | typedef impl::convert_actor<7, TupleResultT, ActorTupleT> converter7;
|
---|
902 | typedef impl::convert_actor<8, TupleResultT, ActorTupleT> converter8;
|
---|
903 | typedef impl::convert_actor<9, TupleResultT, ActorTupleT> converter9;
|
---|
904 | typedef impl::convert_actor<10, TupleResultT, ActorTupleT> converter10;
|
---|
905 | typedef impl::convert_actor<11, TupleResultT, ActorTupleT> converter11;
|
---|
906 |
|
---|
907 | using namespace tuple_index_names;
|
---|
908 | return TupleResultT(
|
---|
909 | converter0::do_(actor_tuple)
|
---|
910 | , converter1::do_(actor_tuple)
|
---|
911 | , converter2::do_(actor_tuple)
|
---|
912 | , converter3::do_(actor_tuple)
|
---|
913 | , converter4::do_(actor_tuple)
|
---|
914 | , converter5::do_(actor_tuple)
|
---|
915 | , converter6::do_(actor_tuple)
|
---|
916 | , converter7::do_(actor_tuple)
|
---|
917 | , converter8::do_(actor_tuple)
|
---|
918 | , converter9::do_(actor_tuple)
|
---|
919 | , converter10::do_(actor_tuple)
|
---|
920 | , converter11::do_(actor_tuple)
|
---|
921 | );
|
---|
922 | }
|
---|
923 | };
|
---|
924 | };
|
---|
925 |
|
---|
926 | #if PHOENIX_LIMIT > 12
|
---|
927 |
|
---|
928 | /////////////////////////////////////
|
---|
929 | template <>
|
---|
930 | struct convert_actors_<13>
|
---|
931 | {
|
---|
932 | template <typename TupleResultT, typename ActorTupleT>
|
---|
933 | struct apply
|
---|
934 | {
|
---|
935 | static TupleResultT
|
---|
936 | do_(ActorTupleT const& actor_tuple)
|
---|
937 | {
|
---|
938 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
939 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
940 | typedef impl::convert_actor<2, TupleResultT, ActorTupleT> converter2;
|
---|
941 | typedef impl::convert_actor<3, TupleResultT, ActorTupleT> converter3;
|
---|
942 | typedef impl::convert_actor<4, TupleResultT, ActorTupleT> converter4;
|
---|
943 | typedef impl::convert_actor<5, TupleResultT, ActorTupleT> converter5;
|
---|
944 | typedef impl::convert_actor<6, TupleResultT, ActorTupleT> converter6;
|
---|
945 | typedef impl::convert_actor<7, TupleResultT, ActorTupleT> converter7;
|
---|
946 | typedef impl::convert_actor<8, TupleResultT, ActorTupleT> converter8;
|
---|
947 | typedef impl::convert_actor<9, TupleResultT, ActorTupleT> converter9;
|
---|
948 | typedef impl::convert_actor<10, TupleResultT, ActorTupleT> converter10;
|
---|
949 | typedef impl::convert_actor<11, TupleResultT, ActorTupleT> converter11;
|
---|
950 | typedef impl::convert_actor<12, TupleResultT, ActorTupleT> converter12;
|
---|
951 |
|
---|
952 | using namespace tuple_index_names;
|
---|
953 | return TupleResultT(
|
---|
954 | converter0::do_(actor_tuple)
|
---|
955 | , converter1::do_(actor_tuple)
|
---|
956 | , converter2::do_(actor_tuple)
|
---|
957 | , converter3::do_(actor_tuple)
|
---|
958 | , converter4::do_(actor_tuple)
|
---|
959 | , converter5::do_(actor_tuple)
|
---|
960 | , converter6::do_(actor_tuple)
|
---|
961 | , converter7::do_(actor_tuple)
|
---|
962 | , converter8::do_(actor_tuple)
|
---|
963 | , converter9::do_(actor_tuple)
|
---|
964 | , converter10::do_(actor_tuple)
|
---|
965 | , converter11::do_(actor_tuple)
|
---|
966 | , converter12::do_(actor_tuple)
|
---|
967 | );
|
---|
968 | }
|
---|
969 | };
|
---|
970 | };
|
---|
971 |
|
---|
972 | ///////////////////////////////////////
|
---|
973 | template <>
|
---|
974 | struct convert_actors_<14>
|
---|
975 | {
|
---|
976 | template <typename TupleResultT, typename ActorTupleT>
|
---|
977 | struct apply
|
---|
978 | {
|
---|
979 | static TupleResultT
|
---|
980 | do_(ActorTupleT const& actor_tuple)
|
---|
981 | {
|
---|
982 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
983 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
984 | typedef impl::convert_actor<2, TupleResultT, ActorTupleT> converter2;
|
---|
985 | typedef impl::convert_actor<3, TupleResultT, ActorTupleT> converter3;
|
---|
986 | typedef impl::convert_actor<4, TupleResultT, ActorTupleT> converter4;
|
---|
987 | typedef impl::convert_actor<5, TupleResultT, ActorTupleT> converter5;
|
---|
988 | typedef impl::convert_actor<6, TupleResultT, ActorTupleT> converter6;
|
---|
989 | typedef impl::convert_actor<7, TupleResultT, ActorTupleT> converter7;
|
---|
990 | typedef impl::convert_actor<8, TupleResultT, ActorTupleT> converter8;
|
---|
991 | typedef impl::convert_actor<9, TupleResultT, ActorTupleT> converter9;
|
---|
992 | typedef impl::convert_actor<10, TupleResultT, ActorTupleT> converter10;
|
---|
993 | typedef impl::convert_actor<11, TupleResultT, ActorTupleT> converter11;
|
---|
994 | typedef impl::convert_actor<12, TupleResultT, ActorTupleT> converter12;
|
---|
995 | typedef impl::convert_actor<13, TupleResultT, ActorTupleT> converter13;
|
---|
996 |
|
---|
997 | using namespace tuple_index_names;
|
---|
998 | return TupleResultT(
|
---|
999 | converter0::do_(actor_tuple)
|
---|
1000 | , converter1::do_(actor_tuple)
|
---|
1001 | , converter2::do_(actor_tuple)
|
---|
1002 | , converter3::do_(actor_tuple)
|
---|
1003 | , converter4::do_(actor_tuple)
|
---|
1004 | , converter5::do_(actor_tuple)
|
---|
1005 | , converter6::do_(actor_tuple)
|
---|
1006 | , converter7::do_(actor_tuple)
|
---|
1007 | , converter8::do_(actor_tuple)
|
---|
1008 | , converter9::do_(actor_tuple)
|
---|
1009 | , converter10::do_(actor_tuple)
|
---|
1010 | , converter11::do_(actor_tuple)
|
---|
1011 | , converter12::do_(actor_tuple)
|
---|
1012 | , converter13::do_(actor_tuple)
|
---|
1013 | );
|
---|
1014 | }
|
---|
1015 | };
|
---|
1016 | };
|
---|
1017 |
|
---|
1018 | ///////////////////////////////////////
|
---|
1019 | template <>
|
---|
1020 | struct convert_actors_<15>
|
---|
1021 | {
|
---|
1022 | template <typename TupleResultT, typename ActorTupleT>
|
---|
1023 | struct apply
|
---|
1024 | {
|
---|
1025 | static TupleResultT
|
---|
1026 | do_(ActorTupleT const& actor_tuple)
|
---|
1027 | {
|
---|
1028 | typedef impl::convert_actor<0, TupleResultT, ActorTupleT> converter0;
|
---|
1029 | typedef impl::convert_actor<1, TupleResultT, ActorTupleT> converter1;
|
---|
1030 | typedef impl::convert_actor<2, TupleResultT, ActorTupleT> converter2;
|
---|
1031 | typedef impl::convert_actor<3, TupleResultT, ActorTupleT> converter3;
|
---|
1032 | typedef impl::convert_actor<4, TupleResultT, ActorTupleT> converter4;
|
---|
1033 | typedef impl::convert_actor<5, TupleResultT, ActorTupleT> converter5;
|
---|
1034 | typedef impl::convert_actor<6, TupleResultT, ActorTupleT> converter6;
|
---|
1035 | typedef impl::convert_actor<7, TupleResultT, ActorTupleT> converter7;
|
---|
1036 | typedef impl::convert_actor<8, TupleResultT, ActorTupleT> converter8;
|
---|
1037 | typedef impl::convert_actor<9, TupleResultT, ActorTupleT> converter9;
|
---|
1038 | typedef impl::convert_actor<10, TupleResultT, ActorTupleT> converter10;
|
---|
1039 | typedef impl::convert_actor<11, TupleResultT, ActorTupleT> converter11;
|
---|
1040 | typedef impl::convert_actor<12, TupleResultT, ActorTupleT> converter12;
|
---|
1041 | typedef impl::convert_actor<13, TupleResultT, ActorTupleT> converter13;
|
---|
1042 | typedef impl::convert_actor<14, TupleResultT, ActorTupleT> converter14;
|
---|
1043 |
|
---|
1044 | using namespace tuple_index_names;
|
---|
1045 | return TupleResultT(
|
---|
1046 | converter0::do_(actor_tuple)
|
---|
1047 | , converter1::do_(actor_tuple)
|
---|
1048 | , converter2::do_(actor_tuple)
|
---|
1049 | , converter3::do_(actor_tuple)
|
---|
1050 | , converter4::do_(actor_tuple)
|
---|
1051 | , converter5::do_(actor_tuple)
|
---|
1052 | , converter6::do_(actor_tuple)
|
---|
1053 | , converter7::do_(actor_tuple)
|
---|
1054 | , converter8::do_(actor_tuple)
|
---|
1055 | , converter9::do_(actor_tuple)
|
---|
1056 | , converter10::do_(actor_tuple)
|
---|
1057 | , converter11::do_(actor_tuple)
|
---|
1058 | , converter12::do_(actor_tuple)
|
---|
1059 | , converter13::do_(actor_tuple)
|
---|
1060 | , converter14::do_(actor_tuple)
|
---|
1061 | );
|
---|
1062 | }
|
---|
1063 | };
|
---|
1064 | };
|
---|
1065 |
|
---|
1066 | #endif
|
---|
1067 | #endif
|
---|
1068 | #endif
|
---|
1069 | #endif
|
---|
1070 | } // namespace impl
|
---|
1071 |
|
---|
1072 |
|
---|
1073 | ///////////////////////////////////////////////////////////////////////////////
|
---|
1074 | } // namespace phoenix
|
---|
1075 |
|
---|
1076 | #endif // PHOENIX_TUPLEHELPERS_HPP
|
---|