| 1 | /*============================================================================= |
| 2 | Phoenix V1.2.1 |
| 3 | Copyright (c) 2001-2003 Joel de Guzman |
| 4 | Copyright (c) 2001-2003 Hartmut Kaiser |
| 5 | |
| 6 | Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 7 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 8 | ==============================================================================*/ |
| 9 | |
| 10 | #ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_CASTS_HPP |
| 11 | #define BOOST_SPIRIT_CLASSIC_PHOENIX_CASTS_HPP |
| 12 | |
| 13 | /////////////////////////////////////////////////////////////////////////////// |
| 14 | #include <boost/spirit/home/classic/phoenix/actor.hpp> |
| 15 | #include <boost/spirit/home/classic/phoenix/composite.hpp> |
| 16 | #include <boost/static_assert.hpp> |
| 17 | |
| 18 | /////////////////////////////////////////////////////////////////////////////// |
| 19 | namespace phoenix { |
| 20 | |
| 21 | /////////////////////////////////////////////////////////////////////////////// |
| 22 | // |
| 23 | // Phoenix predefined maximum construct_ limit. This limit defines the maximum |
| 24 | // number of parameters supported for calles to the set of construct_ template |
| 25 | // functions (lazy object construction, see below). This number defaults to 3. |
| 26 | // The actual maximum is rounded up in multiples of 3. Thus, if this value |
| 27 | // is 4, the actual limit is 6. The ultimate maximum limit in this |
| 28 | // implementation is 15. |
| 29 | // PHOENIX_CONSTRUCT_LIMIT should NOT be greater than PHOENIX_LIMIT! |
| 30 | |
| 31 | #if !defined(PHOENIX_CONSTRUCT_LIMIT) |
| 32 | #define PHOENIX_CONSTRUCT_LIMIT PHOENIX_LIMIT |
| 33 | #endif |
| 34 | |
| 35 | // ensure PHOENIX_CONSTRUCT_LIMIT <= PHOENIX_LIMIT |
| 36 | BOOST_STATIC_ASSERT(PHOENIX_CONSTRUCT_LIMIT <= PHOENIX_LIMIT); |
| 37 | |
| 38 | // ensure PHOENIX_CONSTRUCT_LIMIT <= 15 |
| 39 | BOOST_STATIC_ASSERT(PHOENIX_CONSTRUCT_LIMIT <= 15); |
| 40 | |
| 41 | /////////////////////////////////////////////////////////////////////////////// |
| 42 | // |
| 43 | // Lazy C++ casts |
| 44 | // |
| 45 | // The set of lazy C++ cast template classes and functions provide a way |
| 46 | // of lazily casting certain type to another during parsing. |
| 47 | // The lazy C++ templates are (syntactically) used very much like |
| 48 | // the well known C++ casts: |
| 49 | // |
| 50 | // A *a = static_cast_<A *>(...actor returning a convertible type...); |
| 51 | // |
| 52 | // where the given parameter should be an actor, which eval() function |
| 53 | // returns a convertible type. |
| 54 | // |
| 55 | /////////////////////////////////////////////////////////////////////////////// |
| 56 | template <typename T, typename A> |
| 57 | struct static_cast_l { |
| 58 | |
| 59 | template <typename TupleT> |
| 60 | struct result { typedef T type; }; |
| 61 | |
| 62 | static_cast_l(A const& a_) |
| 63 | : a(a_) {} |
| 64 | |
| 65 | template <typename TupleT> |
| 66 | T |
| 67 | eval(TupleT const& args) const |
| 68 | { |
| 69 | return static_cast<T>(a.eval(args)); |
| 70 | } |
| 71 | |
| 72 | A a; |
| 73 | }; |
| 74 | |
| 75 | ////////////////////////////////// |
| 76 | template <typename T, typename BaseAT> |
| 77 | inline actor<static_cast_l<T, BaseAT> > |
| 78 | static_cast_(actor<BaseAT> const& a) |
| 79 | { |
| 80 | typedef static_cast_l<T, BaseAT> cast_t; |
| 81 | return actor<cast_t>(cast_t(a)); |
| 82 | } |
| 83 | |
| 84 | ////////////////////////////////// |
| 85 | template <typename T, typename A> |
| 86 | struct dynamic_cast_l { |
| 87 | |
| 88 | template <typename TupleT> |
| 89 | struct result { typedef T type; }; |
| 90 | |
| 91 | dynamic_cast_l(A const& a_) |
| 92 | : a(a_) {} |
| 93 | |
| 94 | template <typename TupleT> |
| 95 | T |
| 96 | eval(TupleT const& args) const |
| 97 | { |
| 98 | return dynamic_cast<T>(a.eval(args)); |
| 99 | } |
| 100 | |
| 101 | A a; |
| 102 | }; |
| 103 | |
| 104 | ////////////////////////////////// |
| 105 | template <typename T, typename BaseAT> |
| 106 | inline actor<dynamic_cast_l<T, BaseAT> > |
| 107 | dynamic_cast_(actor<BaseAT> const& a) |
| 108 | { |
| 109 | typedef dynamic_cast_l<T, BaseAT> cast_t; |
| 110 | return actor<cast_t>(cast_t(a)); |
| 111 | } |
| 112 | |
| 113 | ////////////////////////////////// |
| 114 | template <typename T, typename A> |
| 115 | struct reinterpret_cast_l { |
| 116 | |
| 117 | template <typename TupleT> |
| 118 | struct result { typedef T type; }; |
| 119 | |
| 120 | reinterpret_cast_l(A const& a_) |
| 121 | : a(a_) {} |
| 122 | |
| 123 | template <typename TupleT> |
| 124 | T |
| 125 | eval(TupleT const& args) const |
| 126 | { |
| 127 | return reinterpret_cast<T>(a.eval(args)); |
| 128 | } |
| 129 | |
| 130 | A a; |
| 131 | }; |
| 132 | |
| 133 | ////////////////////////////////// |
| 134 | template <typename T, typename BaseAT> |
| 135 | inline actor<reinterpret_cast_l<T, BaseAT> > |
| 136 | reinterpret_cast_(actor<BaseAT> const& a) |
| 137 | { |
| 138 | typedef reinterpret_cast_l<T, BaseAT> cast_t; |
| 139 | return actor<cast_t>(cast_t(a)); |
| 140 | } |
| 141 | |
| 142 | ////////////////////////////////// |
| 143 | template <typename T, typename A> |
| 144 | struct const_cast_l { |
| 145 | |
| 146 | template <typename TupleT> |
| 147 | struct result { typedef T type; }; |
| 148 | |
| 149 | const_cast_l(A const& a_) |
| 150 | : a(a_) {} |
| 151 | |
| 152 | template <typename TupleT> |
| 153 | T |
| 154 | eval(TupleT const& args) const |
| 155 | { |
| 156 | return const_cast<T>(a.eval(args)); |
| 157 | } |
| 158 | |
| 159 | A a; |
| 160 | }; |
| 161 | |
| 162 | ////////////////////////////////// |
| 163 | template <typename T, typename BaseAT> |
| 164 | inline actor<const_cast_l<T, BaseAT> > |
| 165 | const_cast_(actor<BaseAT> const& a) |
| 166 | { |
| 167 | typedef const_cast_l<T, BaseAT> cast_t; |
| 168 | return actor<cast_t>(cast_t(a)); |
| 169 | } |
| 170 | |
| 171 | /////////////////////////////////////////////////////////////////////////////// |
| 172 | // |
| 173 | // construct_ |
| 174 | // |
| 175 | // Lazy object construction |
| 176 | // |
| 177 | // The set of construct_<> template classes and functions provide a way |
| 178 | // of lazily constructing certain object from a arbitrary set of |
| 179 | // actors during parsing. |
| 180 | // The construct_ templates are (syntactically) used very much like |
| 181 | // the well known C++ casts: |
| 182 | // |
| 183 | // A a = construct_<A>(...arbitrary list of actors...); |
| 184 | // |
| 185 | // where the given parameters are submitted as parameters to the |
| 186 | // constructor of the object of type A. (This certainly implies, that |
| 187 | // type A has a constructor with a fitting set of parameter types |
| 188 | // defined.) |
| 189 | // |
| 190 | // The maximum number of needed parameters is controlled through the |
| 191 | // preprocessor constant PHOENIX_CONSTRUCT_LIMIT. Note though, that this |
| 192 | // limit should not be greater than PHOENIX_LIMIT. |
| 193 | // |
| 194 | /////////////////////////////////////////////////////////////////////////////// |
| 195 | template <typename T> |
| 196 | struct construct_l_0 { |
| 197 | typedef T result_type; |
| 198 | |
| 199 | T operator()() const { |
| 200 | return T(); |
| 201 | } |
| 202 | }; |
| 203 | |
| 204 | |
| 205 | template <typename T> |
| 206 | struct construct_l { |
| 207 | |
| 208 | template < |
| 209 | typename A |
| 210 | , typename B |
| 211 | , typename C |
| 212 | |
| 213 | #if PHOENIX_CONSTRUCT_LIMIT > 3 |
| 214 | , typename D |
| 215 | , typename E |
| 216 | , typename F |
| 217 | |
| 218 | #if PHOENIX_CONSTRUCT_LIMIT > 6 |
| 219 | , typename G |
| 220 | , typename H |
| 221 | , typename I |
| 222 | |
| 223 | #if PHOENIX_CONSTRUCT_LIMIT > 9 |
| 224 | , typename J |
| 225 | , typename K |
| 226 | , typename L |
| 227 | |
| 228 | #if PHOENIX_CONSTRUCT_LIMIT > 12 |
| 229 | , typename M |
| 230 | , typename N |
| 231 | , typename O |
| 232 | #endif |
| 233 | #endif |
| 234 | #endif |
| 235 | #endif |
| 236 | > |
| 237 | struct result { typedef T type; }; |
| 238 | |
| 239 | T operator()() const |
| 240 | { |
| 241 | return T(); |
| 242 | } |
| 243 | |
| 244 | template <typename A> |
| 245 | T operator()(A const& a) const |
| 246 | { |
| 247 | T t(a); |
| 248 | return t; |
| 249 | } |
| 250 | |
| 251 | template <typename A, typename B> |
| 252 | T operator()(A const& a, B const& b) const |
| 253 | { |
| 254 | T t(a, b); |
| 255 | return t; |
| 256 | } |
| 257 | |
| 258 | template <typename A, typename B, typename C> |
| 259 | T operator()(A const& a, B const& b, C const& c) const |
| 260 | { |
| 261 | T t(a, b, c); |
| 262 | return t; |
| 263 | } |
| 264 | |
| 265 | #if PHOENIX_CONSTRUCT_LIMIT > 3 |
| 266 | template < |
| 267 | typename A, typename B, typename C, typename D |
| 268 | > |
| 269 | T operator()( |
| 270 | A const& a, B const& b, C const& c, D const& d) const |
| 271 | { |
| 272 | T t(a, b, c, d); |
| 273 | return t; |
| 274 | } |
| 275 | |
| 276 | template < |
| 277 | typename A, typename B, typename C, typename D, typename E |
| 278 | > |
| 279 | T operator()( |
| 280 | A const& a, B const& b, C const& c, D const& d, E const& e) const |
| 281 | { |
| 282 | T t(a, b, c, d, e); |
| 283 | return t; |
| 284 | } |
| 285 | |
| 286 | template < |
| 287 | typename A, typename B, typename C, typename D, typename E, |
| 288 | typename F |
| 289 | > |
| 290 | T operator()( |
| 291 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 292 | F const& f) const |
| 293 | { |
| 294 | T t(a, b, c, d, e, f); |
| 295 | return t; |
| 296 | } |
| 297 | |
| 298 | #if PHOENIX_CONSTRUCT_LIMIT > 6 |
| 299 | template < |
| 300 | typename A, typename B, typename C, typename D, typename E, |
| 301 | typename F, typename G |
| 302 | > |
| 303 | T operator()( |
| 304 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 305 | F const& f, G const& g) const |
| 306 | { |
| 307 | T t(a, b, c, d, e, f, g); |
| 308 | return t; |
| 309 | } |
| 310 | |
| 311 | template < |
| 312 | typename A, typename B, typename C, typename D, typename E, |
| 313 | typename F, typename G, typename H |
| 314 | > |
| 315 | T operator()( |
| 316 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 317 | F const& f, G const& g, H const& h) const |
| 318 | { |
| 319 | T t(a, b, c, d, e, f, g, h); |
| 320 | return t; |
| 321 | } |
| 322 | |
| 323 | template < |
| 324 | typename A, typename B, typename C, typename D, typename E, |
| 325 | typename F, typename G, typename H, typename I |
| 326 | > |
| 327 | T operator()( |
| 328 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 329 | F const& f, G const& g, H const& h, I const& i) const |
| 330 | { |
| 331 | T t(a, b, c, d, e, f, g, h, i); |
| 332 | return t; |
| 333 | } |
| 334 | |
| 335 | #if PHOENIX_CONSTRUCT_LIMIT > 9 |
| 336 | template < |
| 337 | typename A, typename B, typename C, typename D, typename E, |
| 338 | typename F, typename G, typename H, typename I, typename J |
| 339 | > |
| 340 | T operator()( |
| 341 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 342 | F const& f, G const& g, H const& h, I const& i, J const& j) const |
| 343 | { |
| 344 | T t(a, b, c, d, e, f, g, h, i, j); |
| 345 | return t; |
| 346 | } |
| 347 | |
| 348 | template < |
| 349 | typename A, typename B, typename C, typename D, typename E, |
| 350 | typename F, typename G, typename H, typename I, typename J, |
| 351 | typename K |
| 352 | > |
| 353 | T operator()( |
| 354 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 355 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 356 | K const& k) const |
| 357 | { |
| 358 | T t(a, b, c, d, e, f, g, h, i, j, k); |
| 359 | return t; |
| 360 | } |
| 361 | |
| 362 | template < |
| 363 | typename A, typename B, typename C, typename D, typename E, |
| 364 | typename F, typename G, typename H, typename I, typename J, |
| 365 | typename K, typename L |
| 366 | > |
| 367 | T operator()( |
| 368 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 369 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 370 | K const& k, L const& l) const |
| 371 | { |
| 372 | T t(a, b, c, d, e, f, g, h, i, j, k, l); |
| 373 | return t; |
| 374 | } |
| 375 | |
| 376 | #if PHOENIX_CONSTRUCT_LIMIT > 12 |
| 377 | template < |
| 378 | typename A, typename B, typename C, typename D, typename E, |
| 379 | typename F, typename G, typename H, typename I, typename J, |
| 380 | typename K, typename L, typename M |
| 381 | > |
| 382 | T operator()( |
| 383 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 384 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 385 | K const& k, L const& l, M const& m) const |
| 386 | { |
| 387 | T t(a, b, c, d, e, f, g, h, i, j, k, l, m); |
| 388 | return t; |
| 389 | } |
| 390 | |
| 391 | template < |
| 392 | typename A, typename B, typename C, typename D, typename E, |
| 393 | typename F, typename G, typename H, typename I, typename J, |
| 394 | typename K, typename L, typename M, typename N |
| 395 | > |
| 396 | T operator()( |
| 397 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 398 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 399 | K const& k, L const& l, M const& m, N const& n) const |
| 400 | { |
| 401 | T t(a, b, c, d, e, f, g, h, i, j, k, l, m, n); |
| 402 | return t; |
| 403 | } |
| 404 | |
| 405 | template < |
| 406 | typename A, typename B, typename C, typename D, typename E, |
| 407 | typename F, typename G, typename H, typename I, typename J, |
| 408 | typename K, typename L, typename M, typename N, typename O |
| 409 | > |
| 410 | T operator()( |
| 411 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 412 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 413 | K const& k, L const& l, M const& m, N const& n, O const& o) const |
| 414 | { |
| 415 | T t(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); |
| 416 | return t; |
| 417 | } |
| 418 | |
| 419 | #endif |
| 420 | #endif |
| 421 | #endif |
| 422 | #endif |
| 423 | }; |
| 424 | |
| 425 | |
| 426 | template <typename T> |
| 427 | struct construct_1 { |
| 428 | |
| 429 | template < |
| 430 | typename A |
| 431 | > |
| 432 | struct result { typedef T type; }; |
| 433 | |
| 434 | template <typename A> |
| 435 | T operator()(A const& a) const |
| 436 | { |
| 437 | T t(a); |
| 438 | return t; |
| 439 | } |
| 440 | |
| 441 | }; |
| 442 | |
| 443 | template <typename T> |
| 444 | struct construct_2 { |
| 445 | |
| 446 | template < |
| 447 | typename A |
| 448 | , typename B |
| 449 | > |
| 450 | struct result { typedef T type; }; |
| 451 | |
| 452 | template <typename A, typename B> |
| 453 | T operator()(A const& a, B const& b) const |
| 454 | { |
| 455 | T t(a, b); |
| 456 | return t; |
| 457 | } |
| 458 | |
| 459 | }; |
| 460 | |
| 461 | template <typename T> |
| 462 | struct construct_3 { |
| 463 | |
| 464 | template < |
| 465 | typename A |
| 466 | , typename B |
| 467 | , typename C |
| 468 | > |
| 469 | struct result { typedef T type; }; |
| 470 | |
| 471 | template <typename A, typename B, typename C> |
| 472 | T operator()(A const& a, B const& b, C const& c) const |
| 473 | { |
| 474 | T t(a, b, c); |
| 475 | return t; |
| 476 | } |
| 477 | }; |
| 478 | |
| 479 | #if PHOENIX_CONSTRUCT_LIMIT > 3 |
| 480 | template <typename T> |
| 481 | struct construct_4 { |
| 482 | |
| 483 | template < |
| 484 | typename A |
| 485 | , typename B |
| 486 | , typename C |
| 487 | , typename D |
| 488 | > |
| 489 | struct result { typedef T type; }; |
| 490 | |
| 491 | template < |
| 492 | typename A, typename B, typename C, typename D |
| 493 | > |
| 494 | T operator()( |
| 495 | A const& a, B const& b, C const& c, D const& d) const |
| 496 | { |
| 497 | T t(a, b, c, d); |
| 498 | return t; |
| 499 | } |
| 500 | }; |
| 501 | |
| 502 | |
| 503 | template <typename T> |
| 504 | struct construct_5 { |
| 505 | |
| 506 | template < |
| 507 | typename A |
| 508 | , typename B |
| 509 | , typename C |
| 510 | , typename D |
| 511 | , typename E |
| 512 | > |
| 513 | struct result { typedef T type; }; |
| 514 | |
| 515 | template < |
| 516 | typename A, typename B, typename C, typename D, typename E |
| 517 | > |
| 518 | T operator()( |
| 519 | A const& a, B const& b, C const& c, D const& d, E const& e) const |
| 520 | { |
| 521 | T t(a, b, c, d, e); |
| 522 | return t; |
| 523 | } |
| 524 | }; |
| 525 | |
| 526 | |
| 527 | template <typename T> |
| 528 | struct construct_6 { |
| 529 | |
| 530 | template < |
| 531 | typename A |
| 532 | , typename B |
| 533 | , typename C |
| 534 | , typename D |
| 535 | , typename E |
| 536 | , typename F |
| 537 | > |
| 538 | struct result { typedef T type; }; |
| 539 | |
| 540 | template < |
| 541 | typename A, typename B, typename C, typename D, typename E, |
| 542 | typename F |
| 543 | > |
| 544 | T operator()( |
| 545 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 546 | F const& f) const |
| 547 | { |
| 548 | T t(a, b, c, d, e, f); |
| 549 | return t; |
| 550 | } |
| 551 | }; |
| 552 | #endif |
| 553 | |
| 554 | |
| 555 | #if PHOENIX_CONSTRUCT_LIMIT > 6 |
| 556 | template <typename T> |
| 557 | struct construct_7 { |
| 558 | |
| 559 | template < |
| 560 | typename A |
| 561 | , typename B |
| 562 | , typename C |
| 563 | , typename D |
| 564 | , typename E |
| 565 | , typename F |
| 566 | , typename G |
| 567 | > |
| 568 | struct result { typedef T type; }; |
| 569 | |
| 570 | template < |
| 571 | typename A, typename B, typename C, typename D, typename E, |
| 572 | typename F, typename G |
| 573 | > |
| 574 | T operator()( |
| 575 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 576 | F const& f, G const& g) const |
| 577 | { |
| 578 | T t(a, b, c, d, e, f, g); |
| 579 | return t; |
| 580 | } |
| 581 | }; |
| 582 | |
| 583 | template <typename T> |
| 584 | struct construct_8 { |
| 585 | |
| 586 | template < |
| 587 | typename A |
| 588 | , typename B |
| 589 | , typename C |
| 590 | , typename D |
| 591 | , typename E |
| 592 | , typename F |
| 593 | , typename G |
| 594 | , typename H |
| 595 | > |
| 596 | struct result { typedef T type; }; |
| 597 | |
| 598 | template < |
| 599 | typename A, typename B, typename C, typename D, typename E, |
| 600 | typename F, typename G, typename H |
| 601 | > |
| 602 | T operator()( |
| 603 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 604 | F const& f, G const& g, H const& h) const |
| 605 | { |
| 606 | T t(a, b, c, d, e, f, g, h); |
| 607 | return t; |
| 608 | } |
| 609 | }; |
| 610 | |
| 611 | template <typename T> |
| 612 | struct construct_9 { |
| 613 | |
| 614 | template < |
| 615 | typename A |
| 616 | , typename B |
| 617 | , typename C |
| 618 | , typename D |
| 619 | , typename E |
| 620 | , typename F |
| 621 | , typename G |
| 622 | , typename H |
| 623 | , typename I |
| 624 | > |
| 625 | struct result { typedef T type; }; |
| 626 | |
| 627 | template < |
| 628 | typename A, typename B, typename C, typename D, typename E, |
| 629 | typename F, typename G, typename H, typename I |
| 630 | > |
| 631 | T operator()( |
| 632 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 633 | F const& f, G const& g, H const& h, I const& i) const |
| 634 | { |
| 635 | T t(a, b, c, d, e, f, g, h, i); |
| 636 | return t; |
| 637 | } |
| 638 | }; |
| 639 | #endif |
| 640 | |
| 641 | |
| 642 | #if PHOENIX_CONSTRUCT_LIMIT > 9 |
| 643 | template <typename T> |
| 644 | struct construct_10 { |
| 645 | |
| 646 | template < |
| 647 | typename A |
| 648 | , typename B |
| 649 | , typename C |
| 650 | , typename D |
| 651 | , typename E |
| 652 | , typename F |
| 653 | , typename G |
| 654 | , typename H |
| 655 | , typename I |
| 656 | , typename J |
| 657 | > |
| 658 | struct result { typedef T type; }; |
| 659 | |
| 660 | template < |
| 661 | typename A, typename B, typename C, typename D, typename E, |
| 662 | typename F, typename G, typename H, typename I, typename J |
| 663 | > |
| 664 | T operator()( |
| 665 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 666 | F const& f, G const& g, H const& h, I const& i, J const& j) const |
| 667 | { |
| 668 | T t(a, b, c, d, e, f, g, h, i, j); |
| 669 | return t; |
| 670 | } |
| 671 | }; |
| 672 | |
| 673 | template <typename T> |
| 674 | struct construct_11 { |
| 675 | |
| 676 | template < |
| 677 | typename A |
| 678 | , typename B |
| 679 | , typename C |
| 680 | , typename D |
| 681 | , typename E |
| 682 | , typename F |
| 683 | , typename G |
| 684 | , typename H |
| 685 | , typename I |
| 686 | , typename J |
| 687 | , typename K |
| 688 | > |
| 689 | struct result { typedef T type; }; |
| 690 | |
| 691 | template < |
| 692 | typename A, typename B, typename C, typename D, typename E, |
| 693 | typename F, typename G, typename H, typename I, typename J, |
| 694 | typename K |
| 695 | > |
| 696 | T operator()( |
| 697 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 698 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 699 | K const& k) const |
| 700 | { |
| 701 | T t(a, b, c, d, e, f, g, h, i, j, k); |
| 702 | return t; |
| 703 | } |
| 704 | }; |
| 705 | |
| 706 | template <typename T> |
| 707 | struct construct_12 { |
| 708 | |
| 709 | template < |
| 710 | typename A |
| 711 | , typename B |
| 712 | , typename C |
| 713 | , typename D |
| 714 | , typename E |
| 715 | , typename F |
| 716 | , typename G |
| 717 | , typename H |
| 718 | , typename I |
| 719 | , typename J |
| 720 | , typename K |
| 721 | , typename L |
| 722 | > |
| 723 | struct result { typedef T type; }; |
| 724 | |
| 725 | template < |
| 726 | typename A, typename B, typename C, typename D, typename E, |
| 727 | typename F, typename G, typename H, typename I, typename J, |
| 728 | typename K, typename L |
| 729 | > |
| 730 | T operator()( |
| 731 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 732 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 733 | K const& k, L const& l) const |
| 734 | { |
| 735 | T t(a, b, c, d, f, e, g, h, i, j, k, l); |
| 736 | return t; |
| 737 | } |
| 738 | }; |
| 739 | #endif |
| 740 | |
| 741 | #if PHOENIX_CONSTRUCT_LIMIT > 12 |
| 742 | template <typename T> |
| 743 | struct construct_13 { |
| 744 | |
| 745 | template < |
| 746 | typename A |
| 747 | , typename B |
| 748 | , typename C |
| 749 | , typename D |
| 750 | , typename E |
| 751 | , typename F |
| 752 | , typename G |
| 753 | , typename H |
| 754 | , typename I |
| 755 | , typename J |
| 756 | , typename K |
| 757 | , typename L |
| 758 | , typename M |
| 759 | > |
| 760 | struct result { typedef T type; }; |
| 761 | |
| 762 | template < |
| 763 | typename A, typename B, typename C, typename D, typename E, |
| 764 | typename F, typename G, typename H, typename I, typename J, |
| 765 | typename K, typename L, typename M |
| 766 | > |
| 767 | T operator()( |
| 768 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 769 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 770 | K const& k, L const& l, M const& m) const |
| 771 | { |
| 772 | T t(a, b, c, d, e, f, g, h, i, j, k, l, m); |
| 773 | return t; |
| 774 | } |
| 775 | }; |
| 776 | |
| 777 | template <typename T> |
| 778 | struct construct_14 { |
| 779 | |
| 780 | template < |
| 781 | typename A |
| 782 | , typename B |
| 783 | , typename C |
| 784 | , typename D |
| 785 | , typename E |
| 786 | , typename F |
| 787 | , typename G |
| 788 | , typename H |
| 789 | , typename I |
| 790 | , typename J |
| 791 | , typename K |
| 792 | , typename L |
| 793 | , typename M |
| 794 | , typename N |
| 795 | > |
| 796 | struct result { typedef T type; }; |
| 797 | |
| 798 | template < |
| 799 | typename A, typename B, typename C, typename D, typename E, |
| 800 | typename F, typename G, typename H, typename I, typename J, |
| 801 | typename K, typename L, typename M, typename N |
| 802 | > |
| 803 | T operator()( |
| 804 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 805 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 806 | K const& k, L const& l, M const& m, N const& n) const |
| 807 | { |
| 808 | T t(a, b, c, d, e, f, g, h, i, j, k, l, m, n); |
| 809 | return t; |
| 810 | } |
| 811 | }; |
| 812 | |
| 813 | template <typename T> |
| 814 | struct construct_15 { |
| 815 | |
| 816 | template < |
| 817 | typename A |
| 818 | , typename B |
| 819 | , typename C |
| 820 | , typename D |
| 821 | , typename E |
| 822 | , typename F |
| 823 | , typename G |
| 824 | , typename H |
| 825 | , typename I |
| 826 | , typename J |
| 827 | , typename K |
| 828 | , typename L |
| 829 | , typename M |
| 830 | , typename N |
| 831 | , typename O |
| 832 | > |
| 833 | struct result { typedef T type; }; |
| 834 | |
| 835 | template < |
| 836 | typename A, typename B, typename C, typename D, typename E, |
| 837 | typename F, typename G, typename H, typename I, typename J, |
| 838 | typename K, typename L, typename M, typename N, typename O |
| 839 | > |
| 840 | T operator()( |
| 841 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 842 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 843 | K const& k, L const& l, M const& m, N const& n, O const& o) const |
| 844 | { |
| 845 | T t(a, b, c, d, f, e, g, h, i, j, k, l, m, n, o); |
| 846 | return t; |
| 847 | } |
| 848 | }; |
| 849 | #endif |
| 850 | |
| 851 | |
| 852 | #if defined(BOOST_BORLANDC) || (defined(__MWERKS__) && (__MWERKS__ <= 0x3002)) |
| 853 | |
| 854 | /////////////////////////////////////////////////////////////////////////////// |
| 855 | // |
| 856 | // The following specializations are needed because Borland and CodeWarrior |
| 857 | // does not accept default template arguments in nested template classes in |
| 858 | // classes (i.e construct_l::result) |
| 859 | // |
| 860 | /////////////////////////////////////////////////////////////////////////////// |
| 861 | template <typename T, typename TupleT> |
| 862 | struct composite0_result<construct_l_0<T>, TupleT> { |
| 863 | |
| 864 | typedef T type; |
| 865 | }; |
| 866 | |
| 867 | ////////////////////////////////// |
| 868 | template <typename T, typename TupleT, |
| 869 | typename A> |
| 870 | struct composite1_result<construct_l<T>, TupleT, A> { |
| 871 | |
| 872 | typedef T type; |
| 873 | }; |
| 874 | |
| 875 | ////////////////////////////////// |
| 876 | template <typename T, typename TupleT, |
| 877 | typename A, typename B> |
| 878 | struct composite2_result<construct_l<T>, TupleT, A, B> { |
| 879 | |
| 880 | typedef T type; |
| 881 | }; |
| 882 | |
| 883 | ////////////////////////////////// |
| 884 | template <typename T, typename TupleT, |
| 885 | typename A, typename B, typename C> |
| 886 | struct composite3_result<construct_l<T>, TupleT, A, B, C> { |
| 887 | |
| 888 | typedef T type; |
| 889 | }; |
| 890 | |
| 891 | #if PHOENIX_LIMIT > 3 |
| 892 | ////////////////////////////////// |
| 893 | template <typename T, typename TupleT, |
| 894 | typename A, typename B, typename C, typename D> |
| 895 | struct composite4_result<construct_l<T>, TupleT, |
| 896 | A, B, C, D> { |
| 897 | |
| 898 | typedef T type; |
| 899 | }; |
| 900 | |
| 901 | ////////////////////////////////// |
| 902 | template <typename T, typename TupleT, |
| 903 | typename A, typename B, typename C, typename D, typename E> |
| 904 | struct composite5_result<construct_l<T>, TupleT, |
| 905 | A, B, C, D, E> { |
| 906 | |
| 907 | typedef T type; |
| 908 | }; |
| 909 | |
| 910 | ////////////////////////////////// |
| 911 | template <typename T, typename TupleT, |
| 912 | typename A, typename B, typename C, typename D, typename E, |
| 913 | typename F> |
| 914 | struct composite6_result<construct_l<T>, TupleT, |
| 915 | A, B, C, D, E, F> { |
| 916 | |
| 917 | typedef T type; |
| 918 | }; |
| 919 | |
| 920 | #if PHOENIX_LIMIT > 6 |
| 921 | ////////////////////////////////// |
| 922 | template <typename T, typename TupleT, |
| 923 | typename A, typename B, typename C, typename D, typename E, |
| 924 | typename F, typename G> |
| 925 | struct composite7_result<construct_l<T>, TupleT, |
| 926 | A, B, C, D, E, F, G> { |
| 927 | |
| 928 | typedef T type; |
| 929 | }; |
| 930 | |
| 931 | ////////////////////////////////// |
| 932 | template <typename T, typename TupleT, |
| 933 | typename A, typename B, typename C, typename D, typename E, |
| 934 | typename F, typename G, typename H> |
| 935 | struct composite8_result<construct_l<T>, TupleT, |
| 936 | A, B, C, D, E, F, G, H> { |
| 937 | |
| 938 | typedef T type; |
| 939 | }; |
| 940 | |
| 941 | ////////////////////////////////// |
| 942 | template <typename T, typename TupleT, |
| 943 | typename A, typename B, typename C, typename D, typename E, |
| 944 | typename F, typename G, typename H, typename I> |
| 945 | struct composite9_result<construct_l<T>, TupleT, |
| 946 | A, B, C, D, E, F, G, H, I> { |
| 947 | |
| 948 | typedef T type; |
| 949 | }; |
| 950 | |
| 951 | #if PHOENIX_LIMIT > 9 |
| 952 | ////////////////////////////////// |
| 953 | template <typename T, typename TupleT, |
| 954 | typename A, typename B, typename C, typename D, typename E, |
| 955 | typename F, typename G, typename H, typename I, typename J> |
| 956 | struct composite10_result<construct_l<T>, TupleT, |
| 957 | A, B, C, D, E, F, G, H, I, J> { |
| 958 | |
| 959 | typedef T type; |
| 960 | }; |
| 961 | |
| 962 | ////////////////////////////////// |
| 963 | template <typename T, typename TupleT, |
| 964 | typename A, typename B, typename C, typename D, typename E, |
| 965 | typename F, typename G, typename H, typename I, typename J, |
| 966 | typename K> |
| 967 | struct composite11_result<construct_l<T>, TupleT, |
| 968 | A, B, C, D, E, F, G, H, I, J, K> { |
| 969 | |
| 970 | typedef T type; |
| 971 | }; |
| 972 | |
| 973 | ////////////////////////////////// |
| 974 | template <typename T, typename TupleT, |
| 975 | typename A, typename B, typename C, typename D, typename E, |
| 976 | typename F, typename G, typename H, typename I, typename J, |
| 977 | typename K, typename L> |
| 978 | struct composite12_result<construct_l<T>, TupleT, |
| 979 | A, B, C, D, E, F, G, H, I, J, K, L> { |
| 980 | |
| 981 | typedef T type; |
| 982 | }; |
| 983 | |
| 984 | #if PHOENIX_LIMIT > 12 |
| 985 | ////////////////////////////////// |
| 986 | template <typename T, typename TupleT, |
| 987 | typename A, typename B, typename C, typename D, typename E, |
| 988 | typename F, typename G, typename H, typename I, typename J, |
| 989 | typename K, typename L, typename M> |
| 990 | struct composite13_result<construct_l<T>, TupleT, |
| 991 | A, B, C, D, E, F, G, H, I, J, K, L, M> { |
| 992 | |
| 993 | typedef T type; |
| 994 | }; |
| 995 | |
| 996 | ////////////////////////////////// |
| 997 | template <typename T, typename TupleT, |
| 998 | typename A, typename B, typename C, typename D, typename E, |
| 999 | typename F, typename G, typename H, typename I, typename J, |
| 1000 | typename K, typename L, typename M, typename N> |
| 1001 | struct composite14_result<construct_l<T>, TupleT, |
| 1002 | A, B, C, D, E, F, G, H, I, J, K, L, M, N> { |
| 1003 | |
| 1004 | typedef T type; |
| 1005 | }; |
| 1006 | |
| 1007 | ////////////////////////////////// |
| 1008 | template <typename T, typename TupleT, |
| 1009 | typename A, typename B, typename C, typename D, typename E, |
| 1010 | typename F, typename G, typename H, typename I, typename J, |
| 1011 | typename K, typename L, typename M, typename N, typename O> |
| 1012 | struct composite15_result<construct_l<T>, TupleT, |
| 1013 | A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> { |
| 1014 | |
| 1015 | typedef T type; |
| 1016 | }; |
| 1017 | |
| 1018 | #endif |
| 1019 | #endif |
| 1020 | #endif |
| 1021 | #endif |
| 1022 | #endif |
| 1023 | |
| 1024 | ////////////////////////////////// |
| 1025 | template <typename T> |
| 1026 | inline typename impl::make_composite<construct_l_0<T> >::type |
| 1027 | construct_() |
| 1028 | { |
| 1029 | typedef impl::make_composite<construct_l_0<T> > make_composite_t; |
| 1030 | typedef typename make_composite_t::type type_t; |
| 1031 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1032 | |
| 1033 | return type_t(composite_type_t(construct_l_0<T>())); |
| 1034 | } |
| 1035 | |
| 1036 | ////////////////////////////////// |
| 1037 | template <typename T, typename A> |
| 1038 | inline typename impl::make_composite<construct_1<T>, A>::type |
| 1039 | construct_(A const& a) |
| 1040 | { |
| 1041 | typedef impl::make_composite<construct_1<T>, A> make_composite_t; |
| 1042 | typedef typename make_composite_t::type type_t; |
| 1043 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1044 | |
| 1045 | return type_t(composite_type_t(construct_1<T>(), |
| 1046 | as_actor<A>::convert(a) |
| 1047 | )); |
| 1048 | } |
| 1049 | |
| 1050 | ////////////////////////////////// |
| 1051 | template <typename T, typename A, typename B> |
| 1052 | inline typename impl::make_composite<construct_2<T>, A, B>::type |
| 1053 | construct_(A const& a, B const& b) |
| 1054 | { |
| 1055 | typedef impl::make_composite<construct_2<T>, A, B> make_composite_t; |
| 1056 | typedef typename make_composite_t::type type_t; |
| 1057 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1058 | |
| 1059 | return type_t(composite_type_t(construct_2<T>(), |
| 1060 | as_actor<A>::convert(a), |
| 1061 | as_actor<B>::convert(b) |
| 1062 | )); |
| 1063 | } |
| 1064 | |
| 1065 | ////////////////////////////////// |
| 1066 | template <typename T, typename A, typename B, typename C> |
| 1067 | inline typename impl::make_composite<construct_3<T>, A, B, C>::type |
| 1068 | construct_(A const& a, B const& b, C const& c) |
| 1069 | { |
| 1070 | typedef impl::make_composite<construct_3<T>, A, B, C> make_composite_t; |
| 1071 | typedef typename make_composite_t::type type_t; |
| 1072 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1073 | |
| 1074 | return type_t(composite_type_t(construct_3<T>(), |
| 1075 | as_actor<A>::convert(a), |
| 1076 | as_actor<B>::convert(b), |
| 1077 | as_actor<C>::convert(c) |
| 1078 | )); |
| 1079 | } |
| 1080 | |
| 1081 | #if PHOENIX_CONSTRUCT_LIMIT > 3 |
| 1082 | ////////////////////////////////// |
| 1083 | template < |
| 1084 | typename T, typename A, typename B, typename C, typename D |
| 1085 | > |
| 1086 | inline typename impl::make_composite<construct_4<T>, A, B, C, D>::type |
| 1087 | construct_( |
| 1088 | A const& a, B const& b, C const& c, D const& d) |
| 1089 | { |
| 1090 | typedef |
| 1091 | impl::make_composite<construct_4<T>, A, B, C, D> |
| 1092 | make_composite_t; |
| 1093 | typedef typename make_composite_t::type type_t; |
| 1094 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1095 | |
| 1096 | return type_t(composite_type_t(construct_4<T>(), |
| 1097 | as_actor<A>::convert(a), |
| 1098 | as_actor<B>::convert(b), |
| 1099 | as_actor<C>::convert(c), |
| 1100 | as_actor<D>::convert(d) |
| 1101 | )); |
| 1102 | } |
| 1103 | |
| 1104 | ////////////////////////////////// |
| 1105 | template < |
| 1106 | typename T, typename A, typename B, typename C, typename D, typename E |
| 1107 | > |
| 1108 | inline typename impl::make_composite<construct_5<T>, A, B, C, D, E>::type |
| 1109 | construct_( |
| 1110 | A const& a, B const& b, C const& c, D const& d, E const& e) |
| 1111 | { |
| 1112 | typedef |
| 1113 | impl::make_composite<construct_5<T>, A, B, C, D, E> |
| 1114 | make_composite_t; |
| 1115 | typedef typename make_composite_t::type type_t; |
| 1116 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1117 | |
| 1118 | return type_t(composite_type_t(construct_5<T>(), |
| 1119 | as_actor<A>::convert(a), |
| 1120 | as_actor<B>::convert(b), |
| 1121 | as_actor<C>::convert(c), |
| 1122 | as_actor<D>::convert(d), |
| 1123 | as_actor<E>::convert(e) |
| 1124 | )); |
| 1125 | } |
| 1126 | |
| 1127 | ////////////////////////////////// |
| 1128 | template < |
| 1129 | typename T, typename A, typename B, typename C, typename D, typename E, |
| 1130 | typename F |
| 1131 | > |
| 1132 | inline typename impl::make_composite<construct_6<T>, A, B, C, D, E, F>::type |
| 1133 | construct_( |
| 1134 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 1135 | F const& f) |
| 1136 | { |
| 1137 | typedef |
| 1138 | impl::make_composite<construct_6<T>, A, B, C, D, E, F> |
| 1139 | make_composite_t; |
| 1140 | typedef typename make_composite_t::type type_t; |
| 1141 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1142 | |
| 1143 | return type_t(composite_type_t(construct_6<T>(), |
| 1144 | as_actor<A>::convert(a), |
| 1145 | as_actor<B>::convert(b), |
| 1146 | as_actor<C>::convert(c), |
| 1147 | as_actor<D>::convert(d), |
| 1148 | as_actor<E>::convert(e), |
| 1149 | as_actor<F>::convert(f) |
| 1150 | )); |
| 1151 | } |
| 1152 | |
| 1153 | #if PHOENIX_CONSTRUCT_LIMIT > 6 |
| 1154 | ////////////////////////////////// |
| 1155 | template < |
| 1156 | typename T, typename A, typename B, typename C, typename D, typename E, |
| 1157 | typename F, typename G |
| 1158 | > |
| 1159 | inline typename impl::make_composite<construct_7<T>, A, B, C, D, E, F, G>::type |
| 1160 | construct_( |
| 1161 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 1162 | F const& f, G const& g) |
| 1163 | { |
| 1164 | typedef |
| 1165 | impl::make_composite<construct_7<T>, A, B, C, D, E, F, G> |
| 1166 | make_composite_t; |
| 1167 | typedef typename make_composite_t::type type_t; |
| 1168 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1169 | |
| 1170 | return type_t(composite_type_t(construct_7<T>(), |
| 1171 | as_actor<A>::convert(a), |
| 1172 | as_actor<B>::convert(b), |
| 1173 | as_actor<C>::convert(c), |
| 1174 | as_actor<D>::convert(d), |
| 1175 | as_actor<E>::convert(e), |
| 1176 | as_actor<F>::convert(f), |
| 1177 | as_actor<G>::convert(g) |
| 1178 | )); |
| 1179 | } |
| 1180 | |
| 1181 | ////////////////////////////////// |
| 1182 | template < |
| 1183 | typename T, typename A, typename B, typename C, typename D, typename E, |
| 1184 | typename F, typename G, typename H |
| 1185 | > |
| 1186 | inline typename impl::make_composite<construct_8<T>, A, B, C, D, E, F, G, H>::type |
| 1187 | construct_( |
| 1188 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 1189 | F const& f, G const& g, H const& h) |
| 1190 | { |
| 1191 | typedef |
| 1192 | impl::make_composite<construct_8<T>, A, B, C, D, E, F, G, H> |
| 1193 | make_composite_t; |
| 1194 | typedef typename make_composite_t::type type_t; |
| 1195 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1196 | |
| 1197 | return type_t(composite_type_t(construct_8<T>(), |
| 1198 | as_actor<A>::convert(a), |
| 1199 | as_actor<B>::convert(b), |
| 1200 | as_actor<C>::convert(c), |
| 1201 | as_actor<D>::convert(d), |
| 1202 | as_actor<E>::convert(e), |
| 1203 | as_actor<F>::convert(f), |
| 1204 | as_actor<G>::convert(g), |
| 1205 | as_actor<H>::convert(h) |
| 1206 | )); |
| 1207 | } |
| 1208 | |
| 1209 | ////////////////////////////////// |
| 1210 | template < |
| 1211 | typename T, typename A, typename B, typename C, typename D, typename E, |
| 1212 | typename F, typename G, typename H, typename I |
| 1213 | > |
| 1214 | inline typename impl::make_composite<construct_9<T>, A, B, C, D, E, F, G, H, I>::type |
| 1215 | construct_( |
| 1216 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 1217 | F const& f, G const& g, H const& h, I const& i) |
| 1218 | { |
| 1219 | typedef |
| 1220 | impl::make_composite<construct_9<T>, A, B, C, D, E, F, G, H, I> |
| 1221 | make_composite_t; |
| 1222 | typedef typename make_composite_t::type type_t; |
| 1223 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1224 | |
| 1225 | return type_t(composite_type_t(construct_9<T>(), |
| 1226 | as_actor<A>::convert(a), |
| 1227 | as_actor<B>::convert(b), |
| 1228 | as_actor<C>::convert(c), |
| 1229 | as_actor<D>::convert(d), |
| 1230 | as_actor<E>::convert(e), |
| 1231 | as_actor<F>::convert(f), |
| 1232 | as_actor<G>::convert(g), |
| 1233 | as_actor<H>::convert(h), |
| 1234 | as_actor<I>::convert(i) |
| 1235 | )); |
| 1236 | } |
| 1237 | |
| 1238 | #if PHOENIX_CONSTRUCT_LIMIT > 9 |
| 1239 | ////////////////////////////////// |
| 1240 | template < |
| 1241 | typename T, typename A, typename B, typename C, typename D, typename E, |
| 1242 | typename F, typename G, typename H, typename I, typename J |
| 1243 | > |
| 1244 | inline typename impl::make_composite< |
| 1245 | construct_10<T>, A, B, C, D, E, F, G, H, I, J>::type |
| 1246 | construct_( |
| 1247 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 1248 | F const& f, G const& g, H const& h, I const& i, J const& j) |
| 1249 | { |
| 1250 | typedef |
| 1251 | impl::make_composite< |
| 1252 | construct_10<T>, A, B, C, D, E, F, G, H, I, J |
| 1253 | > |
| 1254 | make_composite_t; |
| 1255 | typedef typename make_composite_t::type type_t; |
| 1256 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1257 | |
| 1258 | return type_t(composite_type_t(construct_10<T>(), |
| 1259 | as_actor<A>::convert(a), |
| 1260 | as_actor<B>::convert(b), |
| 1261 | as_actor<C>::convert(c), |
| 1262 | as_actor<D>::convert(d), |
| 1263 | as_actor<E>::convert(e), |
| 1264 | as_actor<F>::convert(f), |
| 1265 | as_actor<G>::convert(g), |
| 1266 | as_actor<H>::convert(h), |
| 1267 | as_actor<I>::convert(i), |
| 1268 | as_actor<J>::convert(j) |
| 1269 | )); |
| 1270 | } |
| 1271 | |
| 1272 | ////////////////////////////////// |
| 1273 | template < |
| 1274 | typename T, typename A, typename B, typename C, typename D, typename E, |
| 1275 | typename F, typename G, typename H, typename I, typename J, typename K |
| 1276 | > |
| 1277 | inline typename impl::make_composite< |
| 1278 | construct_11<T>, A, B, C, D, E, F, G, H, I, J, K>::type |
| 1279 | construct_( |
| 1280 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 1281 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 1282 | K const& k) |
| 1283 | { |
| 1284 | typedef |
| 1285 | impl::make_composite< |
| 1286 | construct_11<T>, A, B, C, D, E, F, G, H, I, J, K |
| 1287 | > |
| 1288 | make_composite_t; |
| 1289 | typedef typename make_composite_t::type type_t; |
| 1290 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1291 | |
| 1292 | return type_t(composite_type_t(construct_11<T>(), |
| 1293 | as_actor<A>::convert(a), |
| 1294 | as_actor<B>::convert(b), |
| 1295 | as_actor<C>::convert(c), |
| 1296 | as_actor<D>::convert(d), |
| 1297 | as_actor<E>::convert(e), |
| 1298 | as_actor<F>::convert(f), |
| 1299 | as_actor<G>::convert(g), |
| 1300 | as_actor<H>::convert(h), |
| 1301 | as_actor<I>::convert(i), |
| 1302 | as_actor<J>::convert(j), |
| 1303 | as_actor<K>::convert(k) |
| 1304 | )); |
| 1305 | } |
| 1306 | |
| 1307 | ////////////////////////////////// |
| 1308 | template < |
| 1309 | typename T, typename A, typename B, typename C, typename D, typename E, |
| 1310 | typename F, typename G, typename H, typename I, typename J, typename K, |
| 1311 | typename L |
| 1312 | > |
| 1313 | inline typename impl::make_composite< |
| 1314 | construct_12<T>, A, B, C, D, E, F, G, H, I, J, K, L>::type |
| 1315 | construct_( |
| 1316 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 1317 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 1318 | K const& k, L const& l) |
| 1319 | { |
| 1320 | typedef |
| 1321 | impl::make_composite< |
| 1322 | construct_12<T>, A, B, C, D, E, F, G, H, I, J, K, L |
| 1323 | > |
| 1324 | make_composite_t; |
| 1325 | typedef typename make_composite_t::type type_t; |
| 1326 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1327 | |
| 1328 | return type_t(composite_type_t(construct_12<T>(), |
| 1329 | as_actor<A>::convert(a), |
| 1330 | as_actor<B>::convert(b), |
| 1331 | as_actor<C>::convert(c), |
| 1332 | as_actor<D>::convert(d), |
| 1333 | as_actor<E>::convert(e), |
| 1334 | as_actor<F>::convert(f), |
| 1335 | as_actor<G>::convert(g), |
| 1336 | as_actor<H>::convert(h), |
| 1337 | as_actor<I>::convert(i), |
| 1338 | as_actor<J>::convert(j), |
| 1339 | as_actor<K>::convert(k), |
| 1340 | as_actor<L>::convert(l) |
| 1341 | )); |
| 1342 | } |
| 1343 | |
| 1344 | #if PHOENIX_CONSTRUCT_LIMIT > 12 |
| 1345 | ////////////////////////////////// |
| 1346 | template < |
| 1347 | typename T, typename A, typename B, typename C, typename D, typename E, |
| 1348 | typename F, typename G, typename H, typename I, typename J, typename K, |
| 1349 | typename L, typename M |
| 1350 | > |
| 1351 | inline typename impl::make_composite< |
| 1352 | construct_13<T>, A, B, C, D, E, F, G, H, I, J, K, L, M>::type |
| 1353 | construct_( |
| 1354 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 1355 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 1356 | K const& k, L const& l, M const& m) |
| 1357 | { |
| 1358 | typedef |
| 1359 | impl::make_composite< |
| 1360 | construct_13<T>, A, B, C, D, E, F, G, H, I, J, K, L, M |
| 1361 | > |
| 1362 | make_composite_t; |
| 1363 | typedef typename make_composite_t::type type_t; |
| 1364 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1365 | |
| 1366 | return type_t(composite_type_t(construct_13<T>(), |
| 1367 | as_actor<A>::convert(a), |
| 1368 | as_actor<B>::convert(b), |
| 1369 | as_actor<C>::convert(c), |
| 1370 | as_actor<D>::convert(d), |
| 1371 | as_actor<E>::convert(e), |
| 1372 | as_actor<F>::convert(f), |
| 1373 | as_actor<G>::convert(g), |
| 1374 | as_actor<H>::convert(h), |
| 1375 | as_actor<I>::convert(i), |
| 1376 | as_actor<J>::convert(j), |
| 1377 | as_actor<K>::convert(k), |
| 1378 | as_actor<L>::convert(l), |
| 1379 | as_actor<M>::convert(m) |
| 1380 | )); |
| 1381 | } |
| 1382 | |
| 1383 | ////////////////////////////////// |
| 1384 | template < |
| 1385 | typename T, typename A, typename B, typename C, typename D, typename E, |
| 1386 | typename F, typename G, typename H, typename I, typename J, typename K, |
| 1387 | typename L, typename M, typename N |
| 1388 | > |
| 1389 | inline typename impl::make_composite< |
| 1390 | construct_14<T>, A, B, C, D, E, F, G, H, I, J, K, L, M>::type |
| 1391 | construct_( |
| 1392 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 1393 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 1394 | K const& k, L const& l, M const& m, N const& n) |
| 1395 | { |
| 1396 | typedef |
| 1397 | impl::make_composite< |
| 1398 | construct_14<T>, A, B, C, D, E, F, G, H, I, J, K, L, M, N |
| 1399 | > |
| 1400 | make_composite_t; |
| 1401 | typedef typename make_composite_t::type type_t; |
| 1402 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1403 | |
| 1404 | return type_t(composite_type_t(construct_14<T>(), |
| 1405 | as_actor<A>::convert(a), |
| 1406 | as_actor<B>::convert(b), |
| 1407 | as_actor<C>::convert(c), |
| 1408 | as_actor<D>::convert(d), |
| 1409 | as_actor<E>::convert(e), |
| 1410 | as_actor<F>::convert(f), |
| 1411 | as_actor<G>::convert(g), |
| 1412 | as_actor<H>::convert(h), |
| 1413 | as_actor<I>::convert(i), |
| 1414 | as_actor<J>::convert(j), |
| 1415 | as_actor<K>::convert(k), |
| 1416 | as_actor<L>::convert(l), |
| 1417 | as_actor<M>::convert(m), |
| 1418 | as_actor<N>::convert(n) |
| 1419 | )); |
| 1420 | } |
| 1421 | |
| 1422 | ////////////////////////////////// |
| 1423 | template < |
| 1424 | typename T, typename A, typename B, typename C, typename D, typename E, |
| 1425 | typename F, typename G, typename H, typename I, typename J, typename K, |
| 1426 | typename L, typename M, typename N, typename O |
| 1427 | > |
| 1428 | inline typename impl::make_composite< |
| 1429 | construct_15<T>, A, B, C, D, E, F, G, H, I, J, K, L, M, O>::type |
| 1430 | construct_( |
| 1431 | A const& a, B const& b, C const& c, D const& d, E const& e, |
| 1432 | F const& f, G const& g, H const& h, I const& i, J const& j, |
| 1433 | K const& k, L const& l, M const& m, N const& n, O const& o) |
| 1434 | { |
| 1435 | typedef |
| 1436 | impl::make_composite< |
| 1437 | construct_15<T>, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O |
| 1438 | > |
| 1439 | make_composite_t; |
| 1440 | typedef typename make_composite_t::type type_t; |
| 1441 | typedef typename make_composite_t::composite_type composite_type_t; |
| 1442 | |
| 1443 | return type_t(composite_type_t(construct_15<T>(), |
| 1444 | as_actor<A>::convert(a), |
| 1445 | as_actor<B>::convert(b), |
| 1446 | as_actor<C>::convert(c), |
| 1447 | as_actor<D>::convert(d), |
| 1448 | as_actor<E>::convert(e), |
| 1449 | as_actor<F>::convert(f), |
| 1450 | as_actor<G>::convert(g), |
| 1451 | as_actor<H>::convert(h), |
| 1452 | as_actor<I>::convert(i), |
| 1453 | as_actor<J>::convert(j), |
| 1454 | as_actor<K>::convert(k), |
| 1455 | as_actor<L>::convert(l), |
| 1456 | as_actor<M>::convert(m), |
| 1457 | as_actor<N>::convert(n), |
| 1458 | as_actor<O>::convert(o) |
| 1459 | )); |
| 1460 | } |
| 1461 | |
| 1462 | #endif |
| 1463 | #endif |
| 1464 | #endif |
| 1465 | #endif |
| 1466 | |
| 1467 | /////////////////////////////////////////////////////////////////////////////// |
| 1468 | } // namespace phoenix |
| 1469 | |
| 1470 | #endif |
| 1471 | |