File indexing completed on 2025-12-16 10:09:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_CASTS_HPP
0011 #define BOOST_SPIRIT_CLASSIC_PHOENIX_CASTS_HPP
0012
0013
0014 #include <boost/spirit/home/classic/phoenix/actor.hpp>
0015 #include <boost/spirit/home/classic/phoenix/composite.hpp>
0016 #include <boost/static_assert.hpp>
0017
0018
0019 namespace phoenix {
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 #if !defined(PHOENIX_CONSTRUCT_LIMIT)
0032 #define PHOENIX_CONSTRUCT_LIMIT PHOENIX_LIMIT
0033 #endif
0034
0035
0036 BOOST_STATIC_ASSERT(PHOENIX_CONSTRUCT_LIMIT <= PHOENIX_LIMIT);
0037
0038
0039 BOOST_STATIC_ASSERT(PHOENIX_CONSTRUCT_LIMIT <= 15);
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056 template <typename T, typename A>
0057 struct static_cast_l {
0058
0059 template <typename TupleT>
0060 struct result { typedef T type; };
0061
0062 static_cast_l(A const& a_)
0063 : a(a_) {}
0064
0065 template <typename TupleT>
0066 T
0067 eval(TupleT const& args) const
0068 {
0069 return static_cast<T>(a.eval(args));
0070 }
0071
0072 A a;
0073 };
0074
0075
0076 template <typename T, typename BaseAT>
0077 inline actor<static_cast_l<T, BaseAT> >
0078 static_cast_(actor<BaseAT> const& a)
0079 {
0080 typedef static_cast_l<T, BaseAT> cast_t;
0081 return actor<cast_t>(cast_t(a));
0082 }
0083
0084
0085 template <typename T, typename A>
0086 struct dynamic_cast_l {
0087
0088 template <typename TupleT>
0089 struct result { typedef T type; };
0090
0091 dynamic_cast_l(A const& a_)
0092 : a(a_) {}
0093
0094 template <typename TupleT>
0095 T
0096 eval(TupleT const& args) const
0097 {
0098 return dynamic_cast<T>(a.eval(args));
0099 }
0100
0101 A a;
0102 };
0103
0104
0105 template <typename T, typename BaseAT>
0106 inline actor<dynamic_cast_l<T, BaseAT> >
0107 dynamic_cast_(actor<BaseAT> const& a)
0108 {
0109 typedef dynamic_cast_l<T, BaseAT> cast_t;
0110 return actor<cast_t>(cast_t(a));
0111 }
0112
0113
0114 template <typename T, typename A>
0115 struct reinterpret_cast_l {
0116
0117 template <typename TupleT>
0118 struct result { typedef T type; };
0119
0120 reinterpret_cast_l(A const& a_)
0121 : a(a_) {}
0122
0123 template <typename TupleT>
0124 T
0125 eval(TupleT const& args) const
0126 {
0127 return reinterpret_cast<T>(a.eval(args));
0128 }
0129
0130 A a;
0131 };
0132
0133
0134 template <typename T, typename BaseAT>
0135 inline actor<reinterpret_cast_l<T, BaseAT> >
0136 reinterpret_cast_(actor<BaseAT> const& a)
0137 {
0138 typedef reinterpret_cast_l<T, BaseAT> cast_t;
0139 return actor<cast_t>(cast_t(a));
0140 }
0141
0142
0143 template <typename T, typename A>
0144 struct const_cast_l {
0145
0146 template <typename TupleT>
0147 struct result { typedef T type; };
0148
0149 const_cast_l(A const& a_)
0150 : a(a_) {}
0151
0152 template <typename TupleT>
0153 T
0154 eval(TupleT const& args) const
0155 {
0156 return const_cast<T>(a.eval(args));
0157 }
0158
0159 A a;
0160 };
0161
0162
0163 template <typename T, typename BaseAT>
0164 inline actor<const_cast_l<T, BaseAT> >
0165 const_cast_(actor<BaseAT> const& a)
0166 {
0167 typedef const_cast_l<T, BaseAT> cast_t;
0168 return actor<cast_t>(cast_t(a));
0169 }
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195 template <typename T>
0196 struct construct_l_0 {
0197 typedef T result_type;
0198
0199 T operator()() const {
0200 return T();
0201 }
0202 };
0203
0204
0205 template <typename T>
0206 struct construct_l {
0207
0208 template <
0209 typename A
0210 , typename B
0211 , typename C
0212
0213 #if PHOENIX_CONSTRUCT_LIMIT > 3
0214 , typename D
0215 , typename E
0216 , typename F
0217
0218 #if PHOENIX_CONSTRUCT_LIMIT > 6
0219 , typename G
0220 , typename H
0221 , typename I
0222
0223 #if PHOENIX_CONSTRUCT_LIMIT > 9
0224 , typename J
0225 , typename K
0226 , typename L
0227
0228 #if PHOENIX_CONSTRUCT_LIMIT > 12
0229 , typename M
0230 , typename N
0231 , typename O
0232 #endif
0233 #endif
0234 #endif
0235 #endif
0236 >
0237 struct result { typedef T type; };
0238
0239 T operator()() const
0240 {
0241 return T();
0242 }
0243
0244 template <typename A>
0245 T operator()(A const& a) const
0246 {
0247 T t(a);
0248 return t;
0249 }
0250
0251 template <typename A, typename B>
0252 T operator()(A const& a, B const& b) const
0253 {
0254 T t(a, b);
0255 return t;
0256 }
0257
0258 template <typename A, typename B, typename C>
0259 T operator()(A const& a, B const& b, C const& c) const
0260 {
0261 T t(a, b, c);
0262 return t;
0263 }
0264
0265 #if PHOENIX_CONSTRUCT_LIMIT > 3
0266 template <
0267 typename A, typename B, typename C, typename D
0268 >
0269 T operator()(
0270 A const& a, B const& b, C const& c, D const& d) const
0271 {
0272 T t(a, b, c, d);
0273 return t;
0274 }
0275
0276 template <
0277 typename A, typename B, typename C, typename D, typename E
0278 >
0279 T operator()(
0280 A const& a, B const& b, C const& c, D const& d, E const& e) const
0281 {
0282 T t(a, b, c, d, e);
0283 return t;
0284 }
0285
0286 template <
0287 typename A, typename B, typename C, typename D, typename E,
0288 typename F
0289 >
0290 T operator()(
0291 A const& a, B const& b, C const& c, D const& d, E const& e,
0292 F const& f) const
0293 {
0294 T t(a, b, c, d, e, f);
0295 return t;
0296 }
0297
0298 #if PHOENIX_CONSTRUCT_LIMIT > 6
0299 template <
0300 typename A, typename B, typename C, typename D, typename E,
0301 typename F, typename G
0302 >
0303 T operator()(
0304 A const& a, B const& b, C const& c, D const& d, E const& e,
0305 F const& f, G const& g) const
0306 {
0307 T t(a, b, c, d, e, f, g);
0308 return t;
0309 }
0310
0311 template <
0312 typename A, typename B, typename C, typename D, typename E,
0313 typename F, typename G, typename H
0314 >
0315 T operator()(
0316 A const& a, B const& b, C const& c, D const& d, E const& e,
0317 F const& f, G const& g, H const& h) const
0318 {
0319 T t(a, b, c, d, e, f, g, h);
0320 return t;
0321 }
0322
0323 template <
0324 typename A, typename B, typename C, typename D, typename E,
0325 typename F, typename G, typename H, typename I
0326 >
0327 T operator()(
0328 A const& a, B const& b, C const& c, D const& d, E const& e,
0329 F const& f, G const& g, H const& h, I const& i) const
0330 {
0331 T t(a, b, c, d, e, f, g, h, i);
0332 return t;
0333 }
0334
0335 #if PHOENIX_CONSTRUCT_LIMIT > 9
0336 template <
0337 typename A, typename B, typename C, typename D, typename E,
0338 typename F, typename G, typename H, typename I, typename J
0339 >
0340 T operator()(
0341 A const& a, B const& b, C const& c, D const& d, E const& e,
0342 F const& f, G const& g, H const& h, I const& i, J const& j) const
0343 {
0344 T t(a, b, c, d, e, f, g, h, i, j);
0345 return t;
0346 }
0347
0348 template <
0349 typename A, typename B, typename C, typename D, typename E,
0350 typename F, typename G, typename H, typename I, typename J,
0351 typename K
0352 >
0353 T operator()(
0354 A const& a, B const& b, C const& c, D const& d, E const& e,
0355 F const& f, G const& g, H const& h, I const& i, J const& j,
0356 K const& k) const
0357 {
0358 T t(a, b, c, d, e, f, g, h, i, j, k);
0359 return t;
0360 }
0361
0362 template <
0363 typename A, typename B, typename C, typename D, typename E,
0364 typename F, typename G, typename H, typename I, typename J,
0365 typename K, typename L
0366 >
0367 T operator()(
0368 A const& a, B const& b, C const& c, D const& d, E const& e,
0369 F const& f, G const& g, H const& h, I const& i, J const& j,
0370 K const& k, L const& l) const
0371 {
0372 T t(a, b, c, d, e, f, g, h, i, j, k, l);
0373 return t;
0374 }
0375
0376 #if PHOENIX_CONSTRUCT_LIMIT > 12
0377 template <
0378 typename A, typename B, typename C, typename D, typename E,
0379 typename F, typename G, typename H, typename I, typename J,
0380 typename K, typename L, typename M
0381 >
0382 T operator()(
0383 A const& a, B const& b, C const& c, D const& d, E const& e,
0384 F const& f, G const& g, H const& h, I const& i, J const& j,
0385 K const& k, L const& l, M const& m) const
0386 {
0387 T t(a, b, c, d, e, f, g, h, i, j, k, l, m);
0388 return t;
0389 }
0390
0391 template <
0392 typename A, typename B, typename C, typename D, typename E,
0393 typename F, typename G, typename H, typename I, typename J,
0394 typename K, typename L, typename M, typename N
0395 >
0396 T operator()(
0397 A const& a, B const& b, C const& c, D const& d, E const& e,
0398 F const& f, G const& g, H const& h, I const& i, J const& j,
0399 K const& k, L const& l, M const& m, N const& n) const
0400 {
0401 T t(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
0402 return t;
0403 }
0404
0405 template <
0406 typename A, typename B, typename C, typename D, typename E,
0407 typename F, typename G, typename H, typename I, typename J,
0408 typename K, typename L, typename M, typename N, typename O
0409 >
0410 T operator()(
0411 A const& a, B const& b, C const& c, D const& d, E const& e,
0412 F const& f, G const& g, H const& h, I const& i, J const& j,
0413 K const& k, L const& l, M const& m, N const& n, O const& o) const
0414 {
0415 T t(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
0416 return t;
0417 }
0418
0419 #endif
0420 #endif
0421 #endif
0422 #endif
0423 };
0424
0425
0426 template <typename T>
0427 struct construct_1 {
0428
0429 template <
0430 typename A
0431 >
0432 struct result { typedef T type; };
0433
0434 template <typename A>
0435 T operator()(A const& a) const
0436 {
0437 T t(a);
0438 return t;
0439 }
0440
0441 };
0442
0443 template <typename T>
0444 struct construct_2 {
0445
0446 template <
0447 typename A
0448 , typename B
0449 >
0450 struct result { typedef T type; };
0451
0452 template <typename A, typename B>
0453 T operator()(A const& a, B const& b) const
0454 {
0455 T t(a, b);
0456 return t;
0457 }
0458
0459 };
0460
0461 template <typename T>
0462 struct construct_3 {
0463
0464 template <
0465 typename A
0466 , typename B
0467 , typename C
0468 >
0469 struct result { typedef T type; };
0470
0471 template <typename A, typename B, typename C>
0472 T operator()(A const& a, B const& b, C const& c) const
0473 {
0474 T t(a, b, c);
0475 return t;
0476 }
0477 };
0478
0479 #if PHOENIX_CONSTRUCT_LIMIT > 3
0480 template <typename T>
0481 struct construct_4 {
0482
0483 template <
0484 typename A
0485 , typename B
0486 , typename C
0487 , typename D
0488 >
0489 struct result { typedef T type; };
0490
0491 template <
0492 typename A, typename B, typename C, typename D
0493 >
0494 T operator()(
0495 A const& a, B const& b, C const& c, D const& d) const
0496 {
0497 T t(a, b, c, d);
0498 return t;
0499 }
0500 };
0501
0502
0503 template <typename T>
0504 struct construct_5 {
0505
0506 template <
0507 typename A
0508 , typename B
0509 , typename C
0510 , typename D
0511 , typename E
0512 >
0513 struct result { typedef T type; };
0514
0515 template <
0516 typename A, typename B, typename C, typename D, typename E
0517 >
0518 T operator()(
0519 A const& a, B const& b, C const& c, D const& d, E const& e) const
0520 {
0521 T t(a, b, c, d, e);
0522 return t;
0523 }
0524 };
0525
0526
0527 template <typename T>
0528 struct construct_6 {
0529
0530 template <
0531 typename A
0532 , typename B
0533 , typename C
0534 , typename D
0535 , typename E
0536 , typename F
0537 >
0538 struct result { typedef T type; };
0539
0540 template <
0541 typename A, typename B, typename C, typename D, typename E,
0542 typename F
0543 >
0544 T operator()(
0545 A const& a, B const& b, C const& c, D const& d, E const& e,
0546 F const& f) const
0547 {
0548 T t(a, b, c, d, e, f);
0549 return t;
0550 }
0551 };
0552 #endif
0553
0554
0555 #if PHOENIX_CONSTRUCT_LIMIT > 6
0556 template <typename T>
0557 struct construct_7 {
0558
0559 template <
0560 typename A
0561 , typename B
0562 , typename C
0563 , typename D
0564 , typename E
0565 , typename F
0566 , typename G
0567 >
0568 struct result { typedef T type; };
0569
0570 template <
0571 typename A, typename B, typename C, typename D, typename E,
0572 typename F, typename G
0573 >
0574 T operator()(
0575 A const& a, B const& b, C const& c, D const& d, E const& e,
0576 F const& f, G const& g) const
0577 {
0578 T t(a, b, c, d, e, f, g);
0579 return t;
0580 }
0581 };
0582
0583 template <typename T>
0584 struct construct_8 {
0585
0586 template <
0587 typename A
0588 , typename B
0589 , typename C
0590 , typename D
0591 , typename E
0592 , typename F
0593 , typename G
0594 , typename H
0595 >
0596 struct result { typedef T type; };
0597
0598 template <
0599 typename A, typename B, typename C, typename D, typename E,
0600 typename F, typename G, typename H
0601 >
0602 T operator()(
0603 A const& a, B const& b, C const& c, D const& d, E const& e,
0604 F const& f, G const& g, H const& h) const
0605 {
0606 T t(a, b, c, d, e, f, g, h);
0607 return t;
0608 }
0609 };
0610
0611 template <typename T>
0612 struct construct_9 {
0613
0614 template <
0615 typename A
0616 , typename B
0617 , typename C
0618 , typename D
0619 , typename E
0620 , typename F
0621 , typename G
0622 , typename H
0623 , typename I
0624 >
0625 struct result { typedef T type; };
0626
0627 template <
0628 typename A, typename B, typename C, typename D, typename E,
0629 typename F, typename G, typename H, typename I
0630 >
0631 T operator()(
0632 A const& a, B const& b, C const& c, D const& d, E const& e,
0633 F const& f, G const& g, H const& h, I const& i) const
0634 {
0635 T t(a, b, c, d, e, f, g, h, i);
0636 return t;
0637 }
0638 };
0639 #endif
0640
0641
0642 #if PHOENIX_CONSTRUCT_LIMIT > 9
0643 template <typename T>
0644 struct construct_10 {
0645
0646 template <
0647 typename A
0648 , typename B
0649 , typename C
0650 , typename D
0651 , typename E
0652 , typename F
0653 , typename G
0654 , typename H
0655 , typename I
0656 , typename J
0657 >
0658 struct result { typedef T type; };
0659
0660 template <
0661 typename A, typename B, typename C, typename D, typename E,
0662 typename F, typename G, typename H, typename I, typename J
0663 >
0664 T operator()(
0665 A const& a, B const& b, C const& c, D const& d, E const& e,
0666 F const& f, G const& g, H const& h, I const& i, J const& j) const
0667 {
0668 T t(a, b, c, d, e, f, g, h, i, j);
0669 return t;
0670 }
0671 };
0672
0673 template <typename T>
0674 struct construct_11 {
0675
0676 template <
0677 typename A
0678 , typename B
0679 , typename C
0680 , typename D
0681 , typename E
0682 , typename F
0683 , typename G
0684 , typename H
0685 , typename I
0686 , typename J
0687 , typename K
0688 >
0689 struct result { typedef T type; };
0690
0691 template <
0692 typename A, typename B, typename C, typename D, typename E,
0693 typename F, typename G, typename H, typename I, typename J,
0694 typename K
0695 >
0696 T operator()(
0697 A const& a, B const& b, C const& c, D const& d, E const& e,
0698 F const& f, G const& g, H const& h, I const& i, J const& j,
0699 K const& k) const
0700 {
0701 T t(a, b, c, d, e, f, g, h, i, j, k);
0702 return t;
0703 }
0704 };
0705
0706 template <typename T>
0707 struct construct_12 {
0708
0709 template <
0710 typename A
0711 , typename B
0712 , typename C
0713 , typename D
0714 , typename E
0715 , typename F
0716 , typename G
0717 , typename H
0718 , typename I
0719 , typename J
0720 , typename K
0721 , typename L
0722 >
0723 struct result { typedef T type; };
0724
0725 template <
0726 typename A, typename B, typename C, typename D, typename E,
0727 typename F, typename G, typename H, typename I, typename J,
0728 typename K, typename L
0729 >
0730 T operator()(
0731 A const& a, B const& b, C const& c, D const& d, E const& e,
0732 F const& f, G const& g, H const& h, I const& i, J const& j,
0733 K const& k, L const& l) const
0734 {
0735 T t(a, b, c, d, f, e, g, h, i, j, k, l);
0736 return t;
0737 }
0738 };
0739 #endif
0740
0741 #if PHOENIX_CONSTRUCT_LIMIT > 12
0742 template <typename T>
0743 struct construct_13 {
0744
0745 template <
0746 typename A
0747 , typename B
0748 , typename C
0749 , typename D
0750 , typename E
0751 , typename F
0752 , typename G
0753 , typename H
0754 , typename I
0755 , typename J
0756 , typename K
0757 , typename L
0758 , typename M
0759 >
0760 struct result { typedef T type; };
0761
0762 template <
0763 typename A, typename B, typename C, typename D, typename E,
0764 typename F, typename G, typename H, typename I, typename J,
0765 typename K, typename L, typename M
0766 >
0767 T operator()(
0768 A const& a, B const& b, C const& c, D const& d, E const& e,
0769 F const& f, G const& g, H const& h, I const& i, J const& j,
0770 K const& k, L const& l, M const& m) const
0771 {
0772 T t(a, b, c, d, e, f, g, h, i, j, k, l, m);
0773 return t;
0774 }
0775 };
0776
0777 template <typename T>
0778 struct construct_14 {
0779
0780 template <
0781 typename A
0782 , typename B
0783 , typename C
0784 , typename D
0785 , typename E
0786 , typename F
0787 , typename G
0788 , typename H
0789 , typename I
0790 , typename J
0791 , typename K
0792 , typename L
0793 , typename M
0794 , typename N
0795 >
0796 struct result { typedef T type; };
0797
0798 template <
0799 typename A, typename B, typename C, typename D, typename E,
0800 typename F, typename G, typename H, typename I, typename J,
0801 typename K, typename L, typename M, typename N
0802 >
0803 T operator()(
0804 A const& a, B const& b, C const& c, D const& d, E const& e,
0805 F const& f, G const& g, H const& h, I const& i, J const& j,
0806 K const& k, L const& l, M const& m, N const& n) const
0807 {
0808 T t(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
0809 return t;
0810 }
0811 };
0812
0813 template <typename T>
0814 struct construct_15 {
0815
0816 template <
0817 typename A
0818 , typename B
0819 , typename C
0820 , typename D
0821 , typename E
0822 , typename F
0823 , typename G
0824 , typename H
0825 , typename I
0826 , typename J
0827 , typename K
0828 , typename L
0829 , typename M
0830 , typename N
0831 , typename O
0832 >
0833 struct result { typedef T type; };
0834
0835 template <
0836 typename A, typename B, typename C, typename D, typename E,
0837 typename F, typename G, typename H, typename I, typename J,
0838 typename K, typename L, typename M, typename N, typename O
0839 >
0840 T operator()(
0841 A const& a, B const& b, C const& c, D const& d, E const& e,
0842 F const& f, G const& g, H const& h, I const& i, J const& j,
0843 K const& k, L const& l, M const& m, N const& n, O const& o) const
0844 {
0845 T t(a, b, c, d, f, e, g, h, i, j, k, l, m, n, o);
0846 return t;
0847 }
0848 };
0849 #endif
0850
0851
0852 #if defined(BOOST_BORLANDC) || (defined(__MWERKS__) && (__MWERKS__ <= 0x3002))
0853
0854
0855
0856
0857
0858
0859
0860
0861 template <typename T, typename TupleT>
0862 struct composite0_result<construct_l_0<T>, TupleT> {
0863
0864 typedef T type;
0865 };
0866
0867
0868 template <typename T, typename TupleT,
0869 typename A>
0870 struct composite1_result<construct_l<T>, TupleT, A> {
0871
0872 typedef T type;
0873 };
0874
0875
0876 template <typename T, typename TupleT,
0877 typename A, typename B>
0878 struct composite2_result<construct_l<T>, TupleT, A, B> {
0879
0880 typedef T type;
0881 };
0882
0883
0884 template <typename T, typename TupleT,
0885 typename A, typename B, typename C>
0886 struct composite3_result<construct_l<T>, TupleT, A, B, C> {
0887
0888 typedef T type;
0889 };
0890
0891 #if PHOENIX_LIMIT > 3
0892
0893 template <typename T, typename TupleT,
0894 typename A, typename B, typename C, typename D>
0895 struct composite4_result<construct_l<T>, TupleT,
0896 A, B, C, D> {
0897
0898 typedef T type;
0899 };
0900
0901
0902 template <typename T, typename TupleT,
0903 typename A, typename B, typename C, typename D, typename E>
0904 struct composite5_result<construct_l<T>, TupleT,
0905 A, B, C, D, E> {
0906
0907 typedef T type;
0908 };
0909
0910
0911 template <typename T, typename TupleT,
0912 typename A, typename B, typename C, typename D, typename E,
0913 typename F>
0914 struct composite6_result<construct_l<T>, TupleT,
0915 A, B, C, D, E, F> {
0916
0917 typedef T type;
0918 };
0919
0920 #if PHOENIX_LIMIT > 6
0921
0922 template <typename T, typename TupleT,
0923 typename A, typename B, typename C, typename D, typename E,
0924 typename F, typename G>
0925 struct composite7_result<construct_l<T>, TupleT,
0926 A, B, C, D, E, F, G> {
0927
0928 typedef T type;
0929 };
0930
0931
0932 template <typename T, typename TupleT,
0933 typename A, typename B, typename C, typename D, typename E,
0934 typename F, typename G, typename H>
0935 struct composite8_result<construct_l<T>, TupleT,
0936 A, B, C, D, E, F, G, H> {
0937
0938 typedef T type;
0939 };
0940
0941
0942 template <typename T, typename TupleT,
0943 typename A, typename B, typename C, typename D, typename E,
0944 typename F, typename G, typename H, typename I>
0945 struct composite9_result<construct_l<T>, TupleT,
0946 A, B, C, D, E, F, G, H, I> {
0947
0948 typedef T type;
0949 };
0950
0951 #if PHOENIX_LIMIT > 9
0952
0953 template <typename T, typename TupleT,
0954 typename A, typename B, typename C, typename D, typename E,
0955 typename F, typename G, typename H, typename I, typename J>
0956 struct composite10_result<construct_l<T>, TupleT,
0957 A, B, C, D, E, F, G, H, I, J> {
0958
0959 typedef T type;
0960 };
0961
0962
0963 template <typename T, typename TupleT,
0964 typename A, typename B, typename C, typename D, typename E,
0965 typename F, typename G, typename H, typename I, typename J,
0966 typename K>
0967 struct composite11_result<construct_l<T>, TupleT,
0968 A, B, C, D, E, F, G, H, I, J, K> {
0969
0970 typedef T type;
0971 };
0972
0973
0974 template <typename T, typename TupleT,
0975 typename A, typename B, typename C, typename D, typename E,
0976 typename F, typename G, typename H, typename I, typename J,
0977 typename K, typename L>
0978 struct composite12_result<construct_l<T>, TupleT,
0979 A, B, C, D, E, F, G, H, I, J, K, L> {
0980
0981 typedef T type;
0982 };
0983
0984 #if PHOENIX_LIMIT > 12
0985
0986 template <typename T, typename TupleT,
0987 typename A, typename B, typename C, typename D, typename E,
0988 typename F, typename G, typename H, typename I, typename J,
0989 typename K, typename L, typename M>
0990 struct composite13_result<construct_l<T>, TupleT,
0991 A, B, C, D, E, F, G, H, I, J, K, L, M> {
0992
0993 typedef T type;
0994 };
0995
0996
0997 template <typename T, typename TupleT,
0998 typename A, typename B, typename C, typename D, typename E,
0999 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 }
1469
1470 #endif