File indexing completed on 2024-11-15 09:31:25
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_BINDERS_HPP
0009 #define BOOST_SPIRIT_CLASSIC_PHOENIX_BINDERS_HPP
0010
0011
0012 #include <boost/spirit/home/classic/phoenix/functions.hpp>
0013 #include <boost/type_traits/is_const.hpp>
0014 #include <boost/mpl/if.hpp>
0015
0016
0017 namespace phoenix {
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170 template <typename FuncT>
0171 struct functor_action : public FuncT {
0172
0173 #if !defined(BOOST_BORLANDC) && (!defined(__MWERKS__) || (__MWERKS__ > 0x3002))
0174
0175 template <
0176 typename A = nil_t
0177 , typename B = nil_t
0178 , typename C = nil_t
0179
0180 #if PHOENIX_LIMIT > 3
0181 , typename D = nil_t
0182 , typename E = nil_t
0183 , typename F = nil_t
0184
0185 #if PHOENIX_LIMIT > 6
0186 , typename G = nil_t
0187 , typename H = nil_t
0188 , typename I = nil_t
0189
0190 #if PHOENIX_LIMIT > 9
0191 , typename J = nil_t
0192 , typename K = nil_t
0193 , typename L = nil_t
0194
0195 #if PHOENIX_LIMIT > 12
0196 , typename M = nil_t
0197 , typename N = nil_t
0198 , typename O = nil_t
0199
0200 #endif
0201 #endif
0202 #endif
0203 #endif
0204 >
0205 struct result { typedef typename FuncT::result_type type; };
0206 #endif
0207
0208 functor_action(FuncT fptr_ = FuncT())
0209 : FuncT(fptr_) {}
0210 };
0211
0212 #if defined(BOOST_BORLANDC) || (defined(__MWERKS__) && (__MWERKS__ <= 0x3002))
0213
0214
0215
0216
0217
0218
0219
0220
0221 template <typename FuncT, typename TupleT>
0222 struct composite0_result<functor_action<FuncT>, TupleT> {
0223
0224 typedef typename FuncT::result_type type;
0225 };
0226
0227
0228 template <typename FuncT, typename TupleT,
0229 typename A>
0230 struct composite1_result<functor_action<FuncT>, TupleT, A> {
0231
0232 typedef typename FuncT::result_type type;
0233 };
0234
0235
0236 template <typename FuncT, typename TupleT,
0237 typename A, typename B>
0238 struct composite2_result<functor_action<FuncT>, TupleT, A, B> {
0239
0240 typedef typename FuncT::result_type type;
0241 };
0242
0243
0244 template <typename FuncT, typename TupleT,
0245 typename A, typename B, typename C>
0246 struct composite3_result<functor_action<FuncT>, TupleT, A, B, C> {
0247
0248 typedef typename FuncT::result_type type;
0249 };
0250
0251 #if PHOENIX_LIMIT > 3
0252
0253 template <typename FuncT, typename TupleT,
0254 typename A, typename B, typename C, typename D>
0255 struct composite4_result<functor_action<FuncT>, TupleT,
0256 A, B, C, D> {
0257
0258 typedef typename FuncT::result_type type;
0259 };
0260
0261
0262 template <typename FuncT, typename TupleT,
0263 typename A, typename B, typename C, typename D, typename E>
0264 struct composite5_result<functor_action<FuncT>, TupleT,
0265 A, B, C, D, E> {
0266
0267 typedef typename FuncT::result_type type;
0268 };
0269
0270
0271 template <typename FuncT, typename TupleT,
0272 typename A, typename B, typename C, typename D, typename E,
0273 typename F>
0274 struct composite6_result<functor_action<FuncT>, TupleT,
0275 A, B, C, D, E, F> {
0276
0277 typedef typename FuncT::result_type type;
0278 };
0279
0280 #if PHOENIX_LIMIT > 6
0281
0282 template <typename FuncT, typename TupleT,
0283 typename A, typename B, typename C, typename D, typename E,
0284 typename F, typename G>
0285 struct composite7_result<functor_action<FuncT>, TupleT,
0286 A, B, C, D, E, F, G> {
0287
0288 typedef typename FuncT::result_type type;
0289 };
0290
0291
0292 template <typename FuncT, typename TupleT,
0293 typename A, typename B, typename C, typename D, typename E,
0294 typename F, typename G, typename H>
0295 struct composite8_result<functor_action<FuncT>, TupleT,
0296 A, B, C, D, E, F, G, H> {
0297
0298 typedef typename FuncT::result_type type;
0299 };
0300
0301
0302 template <typename FuncT, typename TupleT,
0303 typename A, typename B, typename C, typename D, typename E,
0304 typename F, typename G, typename H, typename I>
0305 struct composite9_result<functor_action<FuncT>, TupleT,
0306 A, B, C, D, E, F, G, H, I> {
0307
0308 typedef typename FuncT::result_type type;
0309 };
0310
0311 #if PHOENIX_LIMIT > 9
0312
0313 template <typename FuncT, typename TupleT,
0314 typename A, typename B, typename C, typename D, typename E,
0315 typename F, typename G, typename H, typename I, typename J>
0316 struct composite10_result<functor_action<FuncT>, TupleT,
0317 A, B, C, D, E, F, G, H, I, J> {
0318
0319 typedef typename FuncT::result_type type;
0320 };
0321
0322
0323 template <typename FuncT, typename TupleT,
0324 typename A, typename B, typename C, typename D, typename E,
0325 typename F, typename G, typename H, typename I, typename J,
0326 typename K>
0327 struct composite11_result<functor_action<FuncT>, TupleT,
0328 A, B, C, D, E, F, G, H, I, J, K> {
0329
0330 typedef typename FuncT::result_type type;
0331 };
0332
0333
0334 template <typename FuncT, typename TupleT,
0335 typename A, typename B, typename C, typename D, typename E,
0336 typename F, typename G, typename H, typename I, typename J,
0337 typename K, typename L>
0338 struct composite12_result<functor_action<FuncT>, TupleT,
0339 A, B, C, D, E, F, G, H, I, J, K, L> {
0340
0341 typedef typename FuncT::result_type type;
0342 };
0343
0344 #if PHOENIX_LIMIT > 12
0345
0346 template <typename FuncT, typename TupleT,
0347 typename A, typename B, typename C, typename D, typename E,
0348 typename F, typename G, typename H, typename I, typename J,
0349 typename K, typename L, typename M>
0350 struct composite13_result<functor_action<FuncT>, TupleT,
0351 A, B, C, D, E, F, G, H, I, J, K, L, M> {
0352
0353 typedef typename FuncT::result_type type;
0354 };
0355
0356
0357 template <typename FuncT, typename TupleT,
0358 typename A, typename B, typename C, typename D, typename E,
0359 typename F, typename G, typename H, typename I, typename J,
0360 typename K, typename L, typename M, typename N>
0361 struct composite14_result<functor_action<FuncT>, TupleT,
0362 A, B, C, D, E, F, G, H, I, J, K, L, M, N> {
0363
0364 typedef typename FuncT::result_type type;
0365 };
0366
0367
0368 template <typename FuncT, typename TupleT,
0369 typename A, typename B, typename C, typename D, typename E,
0370 typename F, typename G, typename H, typename I, typename J,
0371 typename K, typename L, typename M, typename N, typename O>
0372 struct composite15_result<functor_action<FuncT>, TupleT,
0373 A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> {
0374
0375 typedef typename FuncT::result_type type;
0376 };
0377
0378 #endif
0379 #endif
0380 #endif
0381 #endif
0382 #endif
0383
0384
0385 template <typename FuncT>
0386 struct functor : public function<functor_action<FuncT> > {
0387
0388 functor(FuncT func)
0389 : function<functor_action<FuncT> >(functor_action<FuncT>(func)) {};
0390 };
0391
0392
0393 template <typename FuncT>
0394 inline functor<FuncT>
0395 bind(FuncT func)
0396 {
0397 return functor<FuncT>(func);
0398 }
0399
0400
0401
0402
0403
0404
0405 namespace impl {
0406
0407
0408 template <typename T>
0409 struct as_ptr {
0410
0411 typedef T* pointer_type;
0412
0413 static T* get(T& ref)
0414 { return &ref; }
0415 };
0416
0417
0418 template <typename T>
0419 struct as_ptr<T*> {
0420
0421 typedef T* pointer_type;
0422
0423 static T* get(T* ptr)
0424 { return ptr; }
0425 };
0426 }
0427
0428
0429 template <typename ActionT, typename ClassT>
0430 struct member_var_ptr_action_result {
0431
0432 typedef typename ActionT::template result<ClassT>::type type;
0433 };
0434
0435
0436 template <typename T, typename ClassT>
0437 struct member_var_ptr_action {
0438
0439 typedef member_var_ptr_action<T, ClassT> self_t;
0440
0441 template <typename CT>
0442 struct result {
0443 typedef typename boost::mpl::if_<boost::is_const<CT>, T const&, T&
0444 >::type type;
0445 };
0446
0447 typedef T ClassT::*mem_var_ptr_t;
0448
0449 member_var_ptr_action(mem_var_ptr_t ptr_)
0450 : ptr(ptr_) {}
0451
0452 template <typename CT>
0453 typename member_var_ptr_action_result<self_t, CT>::type
0454 operator()(CT& obj) const
0455 { return impl::as_ptr<CT>::get(obj)->*ptr; }
0456
0457 mem_var_ptr_t ptr;
0458 };
0459
0460
0461 template <typename T, typename ClassT>
0462 struct member_var_ptr
0463 : public function<member_var_ptr_action<T, ClassT> > {
0464
0465 member_var_ptr(T ClassT::*mp)
0466 : function<member_var_ptr_action<T, ClassT> >
0467 (member_var_ptr_action<T, ClassT>(mp)) {}
0468 };
0469
0470
0471 template <typename T, typename ClassT>
0472 inline member_var_ptr<T, ClassT>
0473 bind(T ClassT::*mp)
0474 {
0475 return member_var_ptr<T, ClassT>(mp);
0476 }
0477
0478
0479
0480
0481
0482
0483 template <
0484 typename RT
0485 , typename A = nil_t
0486 , typename B = nil_t
0487 , typename C = nil_t
0488
0489 #if PHOENIX_LIMIT > 3
0490 , typename D = nil_t
0491 , typename E = nil_t
0492 , typename F = nil_t
0493
0494 #if PHOENIX_LIMIT > 6
0495 , typename G = nil_t
0496 , typename H = nil_t
0497 , typename I = nil_t
0498
0499 #if PHOENIX_LIMIT > 9
0500 , typename J = nil_t
0501 , typename K = nil_t
0502 , typename L = nil_t
0503
0504 #if PHOENIX_LIMIT > 12
0505 , typename M = nil_t
0506 , typename N = nil_t
0507 , typename O = nil_t
0508
0509 #endif
0510 #endif
0511 #endif
0512 #endif
0513
0514 , typename NU = nil_t
0515 >
0516 struct function_ptr_action;
0517
0518
0519 template <
0520 typename RT
0521 , typename A = nil_t
0522 , typename B = nil_t
0523 , typename C = nil_t
0524
0525 #if PHOENIX_LIMIT > 3
0526 , typename D = nil_t
0527 , typename E = nil_t
0528 , typename F = nil_t
0529
0530 #if PHOENIX_LIMIT > 6
0531 , typename G = nil_t
0532 , typename H = nil_t
0533 , typename I = nil_t
0534
0535 #if PHOENIX_LIMIT > 9
0536 , typename J = nil_t
0537 , typename K = nil_t
0538 , typename L = nil_t
0539
0540 #if PHOENIX_LIMIT > 12
0541 , typename M = nil_t
0542 , typename N = nil_t
0543 , typename O = nil_t
0544
0545 #endif
0546 #endif
0547 #endif
0548 #endif
0549 >
0550 struct function_ptr
0551 : public function<function_ptr_action<RT
0552 , A, B, C
0553 #if PHOENIX_LIMIT > 3
0554 , D, E, F
0555 #if PHOENIX_LIMIT > 6
0556 , G, H, I
0557 #if PHOENIX_LIMIT > 9
0558 , J, K, L
0559 #if PHOENIX_LIMIT > 12
0560 , M, N, O
0561 #endif
0562 #endif
0563 #endif
0564 #endif
0565 > > {
0566
0567 typedef function_ptr_action<RT
0568 , A, B, C
0569 #if PHOENIX_LIMIT > 3
0570 , D, E, F
0571 #if PHOENIX_LIMIT > 6
0572 , G, H, I
0573 #if PHOENIX_LIMIT > 9
0574 , J, K, L
0575 #if PHOENIX_LIMIT > 12
0576 , M, N, O
0577 #endif
0578 #endif
0579 #endif
0580 #endif
0581 > action_t;
0582
0583 template <typename FPT>
0584 function_ptr(FPT fp)
0585 : function<action_t>(action_t(fp)) {}
0586 };
0587
0588
0589
0590
0591
0592
0593 template <typename RT>
0594 struct function_ptr_action<RT,
0595 nil_t, nil_t, nil_t,
0596 #if PHOENIX_LIMIT > 3
0597 nil_t, nil_t, nil_t,
0598 #if PHOENIX_LIMIT > 6
0599 nil_t, nil_t, nil_t,
0600 #if PHOENIX_LIMIT > 9
0601 nil_t, nil_t, nil_t,
0602 #if PHOENIX_LIMIT > 12
0603 nil_t, nil_t, nil_t,
0604 #endif
0605 #endif
0606 #endif
0607 #endif
0608 nil_t
0609 > {
0610
0611 typedef RT result_type;
0612 typedef RT(*func_ptr_t)();
0613
0614 function_ptr_action(func_ptr_t fptr_)
0615 : fptr(fptr_) {}
0616
0617 result_type operator()() const
0618 { return fptr(); }
0619
0620 func_ptr_t fptr;
0621 };
0622
0623
0624 template <typename RT>
0625 inline function_ptr<RT>
0626 bind(RT(*fptr)())
0627 {
0628 return function_ptr<RT>(fptr);
0629 }
0630
0631
0632
0633
0634
0635
0636 template <typename RT, typename A>
0637 struct function_ptr_action<RT,
0638 A, nil_t, nil_t,
0639 #if PHOENIX_LIMIT > 3
0640 nil_t, nil_t, nil_t,
0641 #if PHOENIX_LIMIT > 6
0642 nil_t, nil_t, nil_t,
0643 #if PHOENIX_LIMIT > 9
0644 nil_t, nil_t, nil_t,
0645 #if PHOENIX_LIMIT > 12
0646 nil_t, nil_t, nil_t,
0647 #endif
0648 #endif
0649 #endif
0650 #endif
0651 nil_t
0652 > {
0653
0654 typedef RT result_type;
0655 typedef RT(*func_ptr_t)(A);
0656
0657 template <typename A_>
0658 struct result { typedef result_type type; };
0659
0660 function_ptr_action(func_ptr_t fptr_)
0661 : fptr(fptr_) {}
0662
0663 result_type operator()(A a) const
0664 { return fptr(a); }
0665
0666 func_ptr_t fptr;
0667 };
0668
0669
0670 template <typename RT, typename A>
0671 inline function_ptr<RT, A>
0672 bind(RT(*fptr)(A))
0673 {
0674 return function_ptr<RT, A>(fptr);
0675 }
0676
0677
0678
0679
0680
0681
0682 template <typename RT, typename A, typename B>
0683 struct function_ptr_action<RT,
0684 A, B, nil_t,
0685 #if PHOENIX_LIMIT > 3
0686 nil_t, nil_t, nil_t,
0687 #if PHOENIX_LIMIT > 6
0688 nil_t, nil_t, nil_t,
0689 #if PHOENIX_LIMIT > 9
0690 nil_t, nil_t, nil_t,
0691 #if PHOENIX_LIMIT > 12
0692 nil_t, nil_t, nil_t,
0693 #endif
0694 #endif
0695 #endif
0696 #endif
0697 nil_t
0698 > {
0699
0700 typedef RT result_type;
0701 typedef RT(*func_ptr_t)(A, B);
0702
0703 template <typename A_, typename B_>
0704 struct result { typedef result_type type; };
0705
0706 function_ptr_action(func_ptr_t fptr_)
0707 : fptr(fptr_) {}
0708
0709 result_type operator()(A a, B b) const
0710 { return fptr(a, b); }
0711
0712 func_ptr_t fptr;
0713 };
0714
0715
0716 template <typename RT, typename A, typename B>
0717 inline function_ptr<RT, A, B>
0718 bind(RT(*fptr)(A, B))
0719 {
0720 return function_ptr<RT, A, B>(fptr);
0721 }
0722
0723
0724
0725
0726
0727
0728 template <typename RT, typename A, typename B, typename C>
0729 struct function_ptr_action<RT,
0730 A, B, C,
0731 #if PHOENIX_LIMIT > 3
0732 nil_t, nil_t, nil_t,
0733 #if PHOENIX_LIMIT > 6
0734 nil_t, nil_t, nil_t,
0735 #if PHOENIX_LIMIT > 9
0736 nil_t, nil_t, nil_t,
0737 #if PHOENIX_LIMIT > 12
0738 nil_t, nil_t, nil_t,
0739 #endif
0740 #endif
0741 #endif
0742 #endif
0743 nil_t
0744 > {
0745
0746 typedef RT result_type;
0747 typedef RT(*func_ptr_t)(A, B, C);
0748
0749 template <typename A_, typename B_, typename C_>
0750 struct result { typedef result_type type; };
0751
0752 function_ptr_action(func_ptr_t fptr_)
0753 : fptr(fptr_) {}
0754
0755 result_type operator()(A a, B b, C c) const
0756 { return fptr(a, b, c); }
0757
0758 func_ptr_t fptr;
0759 };
0760
0761
0762 template <typename RT, typename A, typename B, typename C>
0763 inline function_ptr<RT, A, B, C>
0764 bind(RT(*fptr)(A, B, C))
0765 {
0766 return function_ptr<RT, A, B, C>(fptr);
0767 }
0768
0769 #if PHOENIX_LIMIT > 3
0770
0771
0772
0773
0774
0775 template <typename RT, typename A, typename B, typename C, typename D>
0776 struct function_ptr_action<RT,
0777 A, B, C, D, nil_t, nil_t,
0778 #if PHOENIX_LIMIT > 6
0779 nil_t, nil_t, nil_t,
0780 #if PHOENIX_LIMIT > 9
0781 nil_t, nil_t, nil_t,
0782 #if PHOENIX_LIMIT > 12
0783 nil_t, nil_t, nil_t,
0784 #endif
0785 #endif
0786 #endif
0787 nil_t
0788 > {
0789
0790 typedef RT result_type;
0791 typedef RT(*func_ptr_t)(A, B, C, D);
0792
0793 template <typename A_, typename B_, typename C_, typename D_>
0794 struct result { typedef result_type type; };
0795
0796 function_ptr_action(func_ptr_t fptr_)
0797 : fptr(fptr_) {}
0798
0799 result_type operator()(A a, B b, C c, D d) const
0800 { return fptr(a, b, c, d); }
0801
0802 func_ptr_t fptr;
0803 };
0804
0805
0806 template <typename RT, typename A, typename B, typename C, typename D>
0807 inline function_ptr<RT, A, B, C, D>
0808 bind(RT(*fptr)(A, B, C, D))
0809 {
0810 return function_ptr<RT, A, B, C, D>(fptr);
0811 }
0812
0813
0814
0815
0816
0817
0818 template <typename RT,
0819 typename A, typename B, typename C, typename D, typename E
0820 >
0821 struct function_ptr_action<RT,
0822 A, B, C, D, E, nil_t,
0823 #if PHOENIX_LIMIT > 6
0824 nil_t, nil_t, nil_t,
0825 #if PHOENIX_LIMIT > 9
0826 nil_t, nil_t, nil_t,
0827 #if PHOENIX_LIMIT > 12
0828 nil_t, nil_t, nil_t,
0829 #endif
0830 #endif
0831 #endif
0832 nil_t
0833 > {
0834
0835 typedef RT result_type;
0836 typedef RT(*func_ptr_t)(A, B, C, D, E);
0837
0838 template <
0839 typename A_, typename B_, typename C_, typename D_, typename E_
0840 >
0841 struct result { typedef result_type type; };
0842
0843 function_ptr_action(func_ptr_t fptr_)
0844 : fptr(fptr_) {}
0845
0846 result_type operator()(
0847 A a, B b, C c, D d, E e
0848 ) const
0849 { return fptr(a, b, c, d, e); }
0850
0851 func_ptr_t fptr;
0852 };
0853
0854
0855 template <typename RT,
0856 typename A, typename B, typename C, typename D, typename E
0857 >
0858 inline function_ptr<RT, A, B, C, D, E>
0859 bind(RT(*fptr)(A, B, C, D, E))
0860 {
0861 return function_ptr<RT, A, B, C, D, E>(fptr);
0862 }
0863
0864
0865
0866
0867
0868
0869 template <typename RT,
0870 typename A, typename B, typename C, typename D, typename E,
0871 typename F
0872 >
0873 struct function_ptr_action<RT,
0874 A, B, C, D, E, F,
0875 #if PHOENIX_LIMIT > 6
0876 nil_t, nil_t, nil_t,
0877 #if PHOENIX_LIMIT > 9
0878 nil_t, nil_t, nil_t,
0879 #if PHOENIX_LIMIT > 12
0880 nil_t, nil_t, nil_t,
0881 #endif
0882 #endif
0883 #endif
0884 nil_t
0885 > {
0886
0887 typedef RT result_type;
0888 typedef RT(*func_ptr_t)(A, B, C, D, E, F);
0889
0890 template <
0891 typename A_, typename B_, typename C_, typename D_, typename E_,
0892 typename F_
0893 >
0894 struct result { typedef result_type type; };
0895
0896 function_ptr_action(func_ptr_t fptr_)
0897 : fptr(fptr_) {}
0898
0899 result_type operator()(
0900 A a, B b, C c, D d, E e,
0901 F f
0902 ) const
0903 { return fptr(a, b, c, d, e, f); }
0904
0905 func_ptr_t fptr;
0906 };
0907
0908
0909 template <typename RT,
0910 typename A, typename B, typename C, typename D, typename E,
0911 typename F
0912 >
0913 inline function_ptr<RT, A, B, C, D, E, F>
0914 bind(RT(*fptr)(A, B, C, D, E, F))
0915 {
0916 return function_ptr<RT, A, B, C, D, E, F>(fptr);
0917 }
0918
0919 #if PHOENIX_LIMIT > 6
0920
0921
0922
0923
0924
0925 template <typename RT,
0926 typename A, typename B, typename C, typename D, typename E,
0927 typename F, typename G
0928 >
0929 struct function_ptr_action<RT,
0930 A, B, C, D, E, F, G, nil_t, nil_t,
0931 #if PHOENIX_LIMIT > 9
0932 nil_t, nil_t, nil_t,
0933 #if PHOENIX_LIMIT > 12
0934 nil_t, nil_t, nil_t,
0935 #endif
0936 #endif
0937 nil_t
0938 > {
0939
0940 typedef RT result_type;
0941 typedef RT(*func_ptr_t)(A, B, C, D, E, F, G);
0942
0943 template <
0944 typename A_, typename B_, typename C_, typename D_, typename E_,
0945 typename F_, typename G_
0946 >
0947 struct result { typedef result_type type; };
0948
0949 function_ptr_action(func_ptr_t fptr_)
0950 : fptr(fptr_) {}
0951
0952 result_type operator()(
0953 A a, B b, C c, D d, E e,
0954 F f, G g
0955 ) const
0956 { return fptr(a, b, c, d, e, f, g); }
0957
0958 func_ptr_t fptr;
0959 };
0960
0961
0962 template <typename RT,
0963 typename A, typename B, typename C, typename D, typename E,
0964 typename F, typename G
0965 >
0966 inline function_ptr<RT, A, B, C, D, E, F, G>
0967 bind(RT(*fptr)(A, B, C, D, E, F, G))
0968 {
0969 return function_ptr<RT, A, B, C, D, E, F, G>(fptr);
0970 }
0971
0972
0973
0974
0975
0976
0977 template <typename RT,
0978 typename A, typename B, typename C, typename D, typename E,
0979 typename F, typename G, typename H
0980 >
0981 struct function_ptr_action<RT,
0982 A, B, C, D, E, F, G, H, nil_t,
0983 #if PHOENIX_LIMIT > 9
0984 nil_t, nil_t, nil_t,
0985 #if PHOENIX_LIMIT > 12
0986 nil_t, nil_t, nil_t,
0987 #endif
0988 #endif
0989 nil_t
0990 > {
0991
0992 typedef RT result_type;
0993 typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H);
0994
0995 template <
0996 typename A_, typename B_, typename C_, typename D_, typename E_,
0997 typename F_, typename G_, typename H_
0998 >
0999 struct result { typedef result_type type; };
1000
1001 function_ptr_action(func_ptr_t fptr_)
1002 : fptr(fptr_) {}
1003
1004 result_type operator()(
1005 A a, B b, C c, D d, E e,
1006 F f, G g, H h
1007 ) const
1008 { return fptr(a, b, c, d, e, f, g, h); }
1009
1010 func_ptr_t fptr;
1011 };
1012
1013
1014 template <typename RT,
1015 typename A, typename B, typename C, typename D, typename E,
1016 typename F, typename G, typename H
1017 >
1018 inline function_ptr<RT, A, B, C, D, E, F, G, H>
1019 bind(RT(*fptr)(A, B, C, D, E, F, G, H))
1020 {
1021 return function_ptr<RT, A, B, C, D, E, F, G, H>(fptr);
1022 }
1023
1024
1025
1026
1027
1028
1029 template <typename RT,
1030 typename A, typename B, typename C, typename D, typename E,
1031 typename F, typename G, typename H, typename I
1032 >
1033 struct function_ptr_action<RT,
1034 A, B, C, D, E, F, G, H, I,
1035 #if PHOENIX_LIMIT > 9
1036 nil_t, nil_t, nil_t,
1037 #if PHOENIX_LIMIT > 12
1038 nil_t, nil_t, nil_t,
1039 #endif
1040 #endif
1041 nil_t
1042 > {
1043
1044 typedef RT result_type;
1045 typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I);
1046
1047 template <
1048 typename A_, typename B_, typename C_, typename D_, typename E_,
1049 typename F_, typename G_, typename H_, typename I_
1050 >
1051 struct result { typedef result_type type; };
1052
1053 function_ptr_action(func_ptr_t fptr_)
1054 : fptr(fptr_) {}
1055
1056 result_type operator()(
1057 A a, B b, C c, D d, E e,
1058 F f, G g, H h, I i
1059 ) const
1060 { return fptr(a, b, c, d, e, f, g, h, i); }
1061
1062 func_ptr_t fptr;
1063 };
1064
1065
1066 template <typename RT,
1067 typename A, typename B, typename C, typename D, typename E,
1068 typename F, typename G, typename H, typename I
1069 >
1070 inline function_ptr<RT, A, B, C, D, E, F, G, H, I>
1071 bind(RT(*fptr)(A, B, C, D, E, F, G, H, I))
1072 {
1073 return function_ptr<RT, A, B, C, D, E, F, G, H, I>(fptr);
1074 }
1075
1076 #if PHOENIX_LIMIT > 9
1077
1078
1079
1080
1081
1082 template <typename RT,
1083 typename A, typename B, typename C, typename D, typename E,
1084 typename F, typename G, typename H, typename I, typename J
1085 >
1086 struct function_ptr_action<RT,
1087 A, B, C, D, E, F, G, H, I, J, nil_t, nil_t,
1088 #if PHOENIX_LIMIT > 12
1089 nil_t, nil_t, nil_t,
1090 #endif
1091 nil_t
1092 > {
1093
1094 typedef RT result_type;
1095 typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I, J);
1096
1097 template <
1098 typename A_, typename B_, typename C_, typename D_, typename E_,
1099 typename F_, typename G_, typename H_, typename I_, typename J_
1100 >
1101 struct result { typedef result_type type; };
1102
1103 function_ptr_action(func_ptr_t fptr_)
1104 : fptr(fptr_) {}
1105
1106 result_type operator()(
1107 A a, B b, C c, D d, E e,
1108 F f, G g, H h, I i, J j
1109 ) const
1110 { return fptr(a, b, c, d, e, f, g, h, i, j); }
1111
1112 func_ptr_t fptr;
1113 };
1114
1115
1116 template <typename RT,
1117 typename A, typename B, typename C, typename D, typename E,
1118 typename F, typename G, typename H, typename I, typename J
1119 >
1120 inline function_ptr<RT, A, B, C, D, E, F, G, H, I, J>
1121 bind(RT(*fptr)(A, B, C, D, E, F, G, H, I, J))
1122 {
1123 return function_ptr<RT, A, B, C, D, E, F, G, H, I, J>(fptr);
1124 }
1125
1126
1127
1128
1129
1130
1131 template <typename RT,
1132 typename A, typename B, typename C, typename D, typename E,
1133 typename F, typename G, typename H, typename I, typename J,
1134 typename K
1135 >
1136 struct function_ptr_action<RT,
1137 A, B, C, D, E, F, G, H, I, J, K, nil_t,
1138 #if PHOENIX_LIMIT > 12
1139 nil_t, nil_t, nil_t,
1140 #endif
1141 nil_t
1142 > {
1143
1144 typedef RT result_type;
1145 typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I, J, K);
1146
1147 template <
1148 typename A_, typename B_, typename C_, typename D_, typename E_,
1149 typename F_, typename G_, typename H_, typename I_, typename J_,
1150 typename K_
1151 >
1152 struct result { typedef result_type type; };
1153
1154 function_ptr_action(func_ptr_t fptr_)
1155 : fptr(fptr_) {}
1156
1157 result_type operator()(
1158 A a, B b, C c, D d, E e,
1159 F f, G g, H h, I i, J j,
1160 K k
1161 ) const
1162 { return fptr(a, b, c, d, e, f, g, h, i, j, k); }
1163
1164 func_ptr_t fptr;
1165 };
1166
1167
1168 template <typename RT,
1169 typename A, typename B, typename C, typename D, typename E,
1170 typename F, typename G, typename H, typename I, typename J,
1171 typename K
1172 >
1173 inline function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K>
1174 bind(RT(*fptr)(A, B, C, D, E, F, G, H, I, J, K))
1175 {
1176 return function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K>(fptr);
1177 }
1178
1179
1180
1181
1182
1183
1184 template <typename RT,
1185 typename A, typename B, typename C, typename D, typename E,
1186 typename F, typename G, typename H, typename I, typename J,
1187 typename K, typename L
1188 >
1189 struct function_ptr_action<RT,
1190 A, B, C, D, E, F, G, H, I, J, K, L,
1191 #if PHOENIX_LIMIT > 12
1192 nil_t, nil_t, nil_t,
1193 #endif
1194 nil_t
1195 > {
1196
1197 typedef RT result_type;
1198 typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I, J, K, L);
1199
1200 template <
1201 typename A_, typename B_, typename C_, typename D_, typename E_,
1202 typename F_, typename G_, typename H_, typename I_, typename J_,
1203 typename K_, typename L_
1204 >
1205 struct result { typedef result_type type; };
1206
1207 function_ptr_action(func_ptr_t fptr_)
1208 : fptr(fptr_) {}
1209
1210 result_type operator()(
1211 A a, B b, C c, D d, E e,
1212 F f, G g, H h, I i, J j,
1213 K k, L l
1214 ) const
1215 { return fptr(a, b, c, d, e, f, g, h, i, j, k, l); }
1216
1217 func_ptr_t fptr;
1218 };
1219
1220
1221 template <typename RT,
1222 typename A, typename B, typename C, typename D, typename E,
1223 typename F, typename G, typename H, typename I, typename J,
1224 typename K, typename L
1225 >
1226 inline function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L>
1227 bind(RT(*fptr)(A, B, C, D, E, F, G, H, I, J, K, L))
1228 {
1229 return function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L>(fptr);
1230 }
1231
1232 #if PHOENIX_LIMIT > 12
1233
1234
1235
1236
1237
1238 template <typename RT,
1239 typename A, typename B, typename C, typename D, typename E,
1240 typename F, typename G, typename H, typename I, typename J,
1241 typename K, typename L, typename M
1242 >
1243 struct function_ptr_action<RT,
1244 A, B, C, D, E, F, G, H, I, J, K, L, M, nil_t, nil_t, nil_t> {
1245
1246 typedef RT result_type;
1247 typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I, J, K, L, M);
1248
1249 template <
1250 typename A_, typename B_, typename C_, typename D_, typename E_,
1251 typename F_, typename G_, typename H_, typename I_, typename J_,
1252 typename K_, typename L_, typename M_
1253 >
1254 struct result { typedef result_type type; };
1255
1256 function_ptr_action(func_ptr_t fptr_)
1257 : fptr(fptr_) {}
1258
1259 result_type operator()(
1260 A a, B b, C c, D d, E e,
1261 F f, G g, H h, I i, J j,
1262 K k, L l, M m
1263 ) const
1264 { return fptr(a, b, c, d, e, f, g, h, i, j, k, l, m); }
1265
1266 func_ptr_t fptr;
1267 };
1268
1269
1270 template <typename RT,
1271 typename A, typename B, typename C, typename D, typename E,
1272 typename F, typename G, typename H, typename I, typename J,
1273 typename K, typename L, typename M
1274 >
1275 inline function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L, M>
1276 bind(RT(*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M))
1277 {
1278 return function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L, M>(fptr);
1279 }
1280
1281
1282
1283
1284
1285
1286 template <typename RT,
1287 typename A, typename B, typename C, typename D, typename E,
1288 typename F, typename G, typename H, typename I, typename J,
1289 typename K, typename L, typename M, typename N
1290 >
1291 struct function_ptr_action<RT,
1292 A, B, C, D, E, F, G, H, I, J, K, L, M, N, nil_t, nil_t> {
1293
1294 typedef RT result_type;
1295 typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I, J, K, L, M, N);
1296
1297 template <
1298 typename A_, typename B_, typename C_, typename D_, typename E_,
1299 typename F_, typename G_, typename H_, typename I_, typename J_,
1300 typename K_, typename L_, typename M_, typename N_
1301 >
1302 struct result { typedef result_type type; };
1303
1304 function_ptr_action(func_ptr_t fptr_)
1305 : fptr(fptr_) {}
1306
1307 result_type operator()(
1308 A a, B b, C c, D d, E e,
1309 F f, G g, H h, I i, J j,
1310 K k, L l, M m, N n
1311 ) const
1312 { return fptr(a, b, c, d, e, f, g, h, i, j, k, l, m, n); }
1313
1314 func_ptr_t fptr;
1315 };
1316
1317
1318 template <typename RT,
1319 typename A, typename B, typename C, typename D, typename E,
1320 typename F, typename G, typename H, typename I, typename J,
1321 typename K, typename L, typename M, typename N
1322 >
1323 inline function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
1324 bind(RT(*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N))
1325 {
1326 return function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(fptr);
1327 }
1328
1329
1330
1331
1332
1333
1334 template <typename RT,
1335 typename A, typename B, typename C, typename D, typename E,
1336 typename F, typename G, typename H, typename I, typename J,
1337 typename K, typename L, typename M, typename N, typename O
1338 >
1339 struct function_ptr_action<RT,
1340 A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, nil_t> {
1341
1342 typedef RT result_type;
1343 typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O);
1344
1345 template <
1346 typename A_, typename B_, typename C_, typename D_, typename E_,
1347 typename F_, typename G_, typename H_, typename I_, typename J_,
1348 typename K_, typename L_, typename M_, typename N_, typename O_
1349 >
1350 struct result { typedef result_type type; };
1351
1352 function_ptr_action(func_ptr_t fptr_)
1353 : fptr(fptr_) {}
1354
1355 result_type operator()(
1356 A a, B b, C c, D d, E e,
1357 F f, G g, H h, I i, J j,
1358 K k, L l, M m, N n, O o
1359 ) const
1360 { return fptr(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); }
1361
1362 func_ptr_t fptr;
1363 };
1364
1365
1366 template <typename RT,
1367 typename A, typename B, typename C, typename D, typename E,
1368 typename F, typename G, typename H, typename I, typename J,
1369 typename K, typename L, typename M, typename N, typename O
1370 >
1371 inline function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
1372 bind(RT(*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O))
1373 {
1374 return function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(fptr);
1375 }
1376
1377 #endif
1378 #endif
1379 #endif
1380 #endif
1381
1382
1383
1384
1385
1386 template <
1387 typename RT,
1388 typename ClassT
1389 , typename A = nil_t
1390 , typename B = nil_t
1391 , typename C = nil_t
1392
1393 #if PHOENIX_LIMIT > 3
1394 , typename D = nil_t
1395 , typename E = nil_t
1396 , typename F = nil_t
1397
1398 #if PHOENIX_LIMIT > 6
1399 , typename G = nil_t
1400 , typename H = nil_t
1401 , typename I = nil_t
1402
1403 #if PHOENIX_LIMIT > 9
1404 , typename J = nil_t
1405 , typename K = nil_t
1406 , typename L = nil_t
1407
1408 #if PHOENIX_LIMIT > 12
1409 , typename M = nil_t
1410 , typename N = nil_t
1411 , typename O = nil_t
1412
1413 #endif
1414 #endif
1415 #endif
1416 #endif
1417
1418 , typename NU = nil_t
1419 >
1420 struct member_function_ptr_action;
1421
1422
1423 template <
1424 typename RT,
1425 typename ClassT
1426 , typename A = nil_t
1427 , typename B = nil_t
1428 , typename C = nil_t
1429
1430 #if PHOENIX_LIMIT > 3
1431 , typename D = nil_t
1432 , typename E = nil_t
1433 , typename F = nil_t
1434
1435 #if PHOENIX_LIMIT > 6
1436 , typename G = nil_t
1437 , typename H = nil_t
1438 , typename I = nil_t
1439
1440 #if PHOENIX_LIMIT > 9
1441 , typename J = nil_t
1442 , typename K = nil_t
1443 , typename L = nil_t
1444
1445 #if PHOENIX_LIMIT > 12
1446 , typename M = nil_t
1447 , typename N = nil_t
1448 , typename O = nil_t
1449
1450 #endif
1451 #endif
1452 #endif
1453 #endif
1454 >
1455 struct member_function_ptr
1456 : public function<member_function_ptr_action<RT, ClassT
1457 , A, B, C
1458 #if PHOENIX_LIMIT > 3
1459 , D, E, F
1460 #if PHOENIX_LIMIT > 6
1461 , G, H, I
1462 #if PHOENIX_LIMIT > 9
1463 , J, K, L
1464 #if PHOENIX_LIMIT > 12
1465 , M, N, O
1466 #endif
1467 #endif
1468 #endif
1469 #endif
1470 > > {
1471
1472 typedef member_function_ptr_action<RT, ClassT
1473 , A, B, C
1474 #if PHOENIX_LIMIT > 3
1475 , D, E, F
1476 #if PHOENIX_LIMIT > 6
1477 , G, H, I
1478 #if PHOENIX_LIMIT > 9
1479 , J, K, L
1480 #if PHOENIX_LIMIT > 12
1481 , M, N, O
1482 #endif
1483 #endif
1484 #endif
1485 #endif
1486 > action_t;
1487
1488 template <typename FPT>
1489 member_function_ptr(FPT fp)
1490 : function<action_t>(action_t(fp)) {}
1491 };
1492
1493
1494
1495
1496
1497
1498 template <typename RT, typename ClassT>
1499 struct member_function_ptr_action<RT, ClassT,
1500 nil_t, nil_t, nil_t,
1501 #if PHOENIX_LIMIT > 3
1502 nil_t, nil_t, nil_t,
1503 #if PHOENIX_LIMIT > 6
1504 nil_t, nil_t, nil_t,
1505 #if PHOENIX_LIMIT > 9
1506 nil_t, nil_t, nil_t,
1507 #if PHOENIX_LIMIT > 12
1508 nil_t, nil_t, nil_t,
1509 #endif
1510 #endif
1511 #endif
1512 #endif
1513 nil_t
1514 > {
1515
1516 typedef RT result_type;
1517 typedef RT(ClassT::*mf)();
1518 typedef RT(ClassT::*cmf)() const;
1519 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1520 mem_func_ptr_t;
1521
1522 template <typename CT>
1523 struct result { typedef result_type type; };
1524
1525 member_function_ptr_action(mem_func_ptr_t fptr_)
1526 : fptr(fptr_) {}
1527
1528 template <typename CT>
1529 result_type operator()(CT& obj) const
1530 { return (impl::as_ptr<CT>::get(obj)->*fptr)(); }
1531
1532 mem_func_ptr_t fptr;
1533 };
1534
1535
1536 template <typename RT, typename ClassT>
1537 inline member_function_ptr<RT, ClassT>
1538 bind(RT(ClassT::*fptr)())
1539 {
1540 return member_function_ptr<RT, ClassT>(fptr);
1541 }
1542
1543 template <typename RT, typename ClassT>
1544 inline member_function_ptr<RT, ClassT const>
1545 bind(RT(ClassT::*fptr)() const)
1546 {
1547 return member_function_ptr<RT, ClassT const>(fptr);
1548 }
1549
1550
1551
1552
1553
1554
1555 template <typename RT, typename ClassT, typename A>
1556 struct member_function_ptr_action<RT, ClassT,
1557 A, nil_t, nil_t,
1558 #if PHOENIX_LIMIT > 3
1559 nil_t, nil_t, nil_t,
1560 #if PHOENIX_LIMIT > 6
1561 nil_t, nil_t, nil_t,
1562 #if PHOENIX_LIMIT > 9
1563 nil_t, nil_t, nil_t,
1564 #if PHOENIX_LIMIT > 12
1565 nil_t, nil_t, nil_t,
1566 #endif
1567 #endif
1568 #endif
1569 #endif
1570 nil_t
1571 > {
1572
1573 typedef RT result_type;
1574 typedef RT(ClassT::*mf)(A);
1575 typedef RT(ClassT::*cmf)(A) const;
1576 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1577 mem_func_ptr_t;
1578
1579 template <typename CT, typename A_>
1580 struct result { typedef result_type type; };
1581
1582 member_function_ptr_action(mem_func_ptr_t fptr_)
1583 : fptr(fptr_) {}
1584
1585 template <typename CT>
1586 result_type operator()(CT& obj, A a) const
1587 { return (impl::as_ptr<CT>::get(obj)->*fptr)(a); }
1588
1589 mem_func_ptr_t fptr;
1590 };
1591
1592
1593 template <typename RT, typename ClassT, typename A>
1594 inline member_function_ptr<RT, ClassT, A>
1595 bind(RT(ClassT::*fptr)(A))
1596 {
1597 return member_function_ptr<RT, ClassT, A>(fptr);
1598 }
1599
1600
1601 template <typename RT, typename ClassT, typename A>
1602 inline member_function_ptr<RT, ClassT const, A>
1603 bind(RT(ClassT::*fptr)(A) const)
1604 {
1605 return member_function_ptr<RT, ClassT const, A>(fptr);
1606 }
1607
1608
1609
1610
1611
1612
1613 template <typename RT, typename ClassT, typename A, typename B>
1614 struct member_function_ptr_action<RT, ClassT,
1615 A, B, nil_t,
1616 #if PHOENIX_LIMIT > 3
1617 nil_t, nil_t, nil_t,
1618 #if PHOENIX_LIMIT > 6
1619 nil_t, nil_t, nil_t,
1620 #if PHOENIX_LIMIT > 9
1621 nil_t, nil_t, nil_t,
1622 #if PHOENIX_LIMIT > 12
1623 nil_t, nil_t, nil_t,
1624 #endif
1625 #endif
1626 #endif
1627 #endif
1628 nil_t
1629 > {
1630
1631 typedef RT result_type;
1632 typedef RT(ClassT::*mf)(A, B);
1633 typedef RT(ClassT::*cmf)(A, B) const;
1634 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1635 mem_func_ptr_t;
1636
1637 template <typename CT, typename A_, typename B_>
1638 struct result { typedef result_type type; };
1639
1640 member_function_ptr_action(mem_func_ptr_t fptr_)
1641 : fptr(fptr_) {}
1642
1643 template <typename CT>
1644 result_type operator()(CT& obj, A a, B b) const
1645 { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b); }
1646
1647 mem_func_ptr_t fptr;
1648 };
1649
1650
1651 template <typename RT, typename ClassT, typename A, typename B>
1652 inline member_function_ptr<RT, ClassT, A, B>
1653 bind(RT(ClassT::*fptr)(A, B))
1654 {
1655 return member_function_ptr<RT, ClassT, A, B>(fptr);
1656 }
1657
1658
1659 template <typename RT, typename ClassT, typename A, typename B>
1660 inline member_function_ptr<RT, ClassT const, A, B>
1661 bind(RT(ClassT::*fptr)(A, B) const)
1662 {
1663 return member_function_ptr<RT, ClassT const, A, B>(fptr);
1664 }
1665
1666 #if PHOENIX_LIMIT > 3
1667
1668
1669
1670
1671
1672 template <typename RT, typename ClassT, typename A, typename B, typename C>
1673 struct member_function_ptr_action<RT, ClassT,
1674 A, B, C, nil_t, nil_t, nil_t,
1675 #if PHOENIX_LIMIT > 6
1676 nil_t, nil_t, nil_t,
1677 #if PHOENIX_LIMIT > 9
1678 nil_t, nil_t, nil_t,
1679 #if PHOENIX_LIMIT > 12
1680 nil_t, nil_t, nil_t,
1681 #endif
1682 #endif
1683 #endif
1684 nil_t
1685 > {
1686
1687 typedef RT result_type;
1688 typedef RT(ClassT::*mf)(A, B, C);
1689 typedef RT(ClassT::*cmf)(A, B, C) const;
1690 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1691 mem_func_ptr_t;
1692
1693 template <typename CT, typename A_, typename B_, typename C_>
1694 struct result { typedef result_type type; };
1695
1696 member_function_ptr_action(mem_func_ptr_t fptr_)
1697 : fptr(fptr_) {}
1698
1699 template <typename CT>
1700 result_type operator()(CT& obj, A a, B b, C c) const
1701 { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c); }
1702
1703 mem_func_ptr_t fptr;
1704 };
1705
1706
1707 template <typename RT, typename ClassT, typename A, typename B, typename C>
1708 inline member_function_ptr<RT, ClassT, A, B, C>
1709 bind(RT(ClassT::*fptr)(A, B, C))
1710 {
1711 return member_function_ptr<RT, ClassT, A, B, C>(fptr);
1712 }
1713
1714
1715 template <typename RT, typename ClassT, typename A, typename B, typename C>
1716 inline member_function_ptr<RT, ClassT const, A, B, C>
1717 bind(RT(ClassT::*fptr)(A, B, C) const)
1718 {
1719 return member_function_ptr<RT, ClassT const, A, B, C>(fptr);
1720 }
1721
1722
1723
1724
1725
1726
1727 template <typename RT, typename ClassT,
1728 typename A, typename B, typename C, typename D
1729 >
1730 struct member_function_ptr_action<RT, ClassT,
1731 A, B, C, D, nil_t, nil_t,
1732 #if PHOENIX_LIMIT > 6
1733 nil_t, nil_t, nil_t,
1734 #if PHOENIX_LIMIT > 9
1735 nil_t, nil_t, nil_t,
1736 #if PHOENIX_LIMIT > 12
1737 nil_t, nil_t, nil_t,
1738 #endif
1739 #endif
1740 #endif
1741 nil_t
1742 > {
1743
1744 typedef RT result_type;
1745 typedef RT(ClassT::*mf)(A, B, C, D);
1746 typedef RT(ClassT::*cmf)(A, B, C, D) const;
1747 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1748 mem_func_ptr_t;
1749
1750 template <typename CT,
1751 typename A_, typename B_, typename C_, typename D_
1752 >
1753 struct result { typedef result_type type; };
1754
1755 member_function_ptr_action(mem_func_ptr_t fptr_)
1756 : fptr(fptr_) {}
1757
1758 template <typename CT>
1759 result_type operator()(CT& obj,
1760 A a, B b, C c, D d
1761 ) const
1762 { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c, d); }
1763
1764 mem_func_ptr_t fptr;
1765 };
1766
1767
1768 template <typename RT, typename ClassT,
1769 typename A, typename B, typename C, typename D
1770 >
1771 inline member_function_ptr<RT, ClassT, A, B, C, D>
1772 bind(RT(ClassT::*fptr)(A, B, C, D))
1773 {
1774 return member_function_ptr<
1775 RT, ClassT, A, B, C, D>(fptr);
1776 }
1777
1778
1779 template <typename RT, typename ClassT,
1780 typename A, typename B, typename C, typename D
1781 >
1782 inline member_function_ptr<RT, ClassT const, A, B, C, D>
1783 bind(RT(ClassT::*fptr)(A, B, C, D) const)
1784 {
1785 return member_function_ptr<
1786 RT, ClassT const, A, B, C, D>(fptr);
1787 }
1788
1789
1790
1791
1792
1793
1794 template <typename RT, typename ClassT,
1795 typename A, typename B, typename C, typename D,
1796 typename E
1797 >
1798 struct member_function_ptr_action<RT, ClassT,
1799 A, B, C, D, E, nil_t,
1800 #if PHOENIX_LIMIT > 6
1801 nil_t, nil_t, nil_t,
1802 #if PHOENIX_LIMIT > 9
1803 nil_t, nil_t, nil_t,
1804 #if PHOENIX_LIMIT > 12
1805 nil_t, nil_t, nil_t,
1806 #endif
1807 #endif
1808 #endif
1809 nil_t
1810 > {
1811
1812 typedef RT result_type;
1813 typedef RT(ClassT::*mf)(A, B, C, D, E);
1814 typedef RT(ClassT::*cmf)(A, B, C, D, E) const;
1815 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1816 mem_func_ptr_t;
1817
1818 template <typename CT,
1819 typename A_, typename B_, typename C_, typename D_,
1820 typename E_
1821 >
1822 struct result { typedef result_type type; };
1823
1824 member_function_ptr_action(mem_func_ptr_t fptr_)
1825 : fptr(fptr_) {}
1826
1827 template <typename CT>
1828 result_type operator()(CT& obj,
1829 A a, B b, C c, D d, E e
1830 ) const
1831 { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c, d, e); }
1832
1833 mem_func_ptr_t fptr;
1834 };
1835
1836
1837 template <typename RT, typename ClassT,
1838 typename A, typename B, typename C, typename D,
1839 typename E
1840 >
1841 inline member_function_ptr<RT, ClassT, A, B, C, D, E>
1842 bind(RT(ClassT::*fptr)(A, B, C, D, E))
1843 {
1844 return member_function_ptr<
1845 RT, ClassT, A, B, C, D, E>(fptr);
1846 }
1847
1848
1849 template <typename RT, typename ClassT,
1850 typename A, typename B, typename C, typename D,
1851 typename E
1852 >
1853 inline member_function_ptr<RT, ClassT const, A, B, C, D, E>
1854 bind(RT(ClassT::*fptr)(A, B, C, D, E) const)
1855 {
1856 return member_function_ptr<
1857 RT, ClassT const, A, B, C, D, E>(fptr);
1858 }
1859
1860 #if PHOENIX_LIMIT > 6
1861
1862
1863
1864
1865
1866 template <typename RT, typename ClassT,
1867 typename A, typename B, typename C, typename D,
1868 typename E, typename F
1869 >
1870 struct member_function_ptr_action<RT, ClassT,
1871 A, B, C, D, E, F, nil_t, nil_t, nil_t,
1872 #if PHOENIX_LIMIT > 9
1873 nil_t, nil_t, nil_t,
1874 #if PHOENIX_LIMIT > 12
1875 nil_t, nil_t, nil_t,
1876 #endif
1877 #endif
1878 nil_t
1879 > {
1880
1881 typedef RT result_type;
1882 typedef RT(ClassT::*mf)(A, B, C, D, E, F);
1883 typedef RT(ClassT::*cmf)(A, B, C, D, E, F) const;
1884 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1885 mem_func_ptr_t;
1886
1887 template <typename CT,
1888 typename A_, typename B_, typename C_, typename D_,
1889 typename E_, typename F_
1890 >
1891 struct result { typedef result_type type; };
1892
1893 member_function_ptr_action(mem_func_ptr_t fptr_)
1894 : fptr(fptr_) {}
1895
1896 template <typename CT>
1897 result_type operator()(CT& obj,
1898 A a, B b, C c, D d, E e, F f
1899 ) const
1900 { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c, d, e, f); }
1901
1902 mem_func_ptr_t fptr;
1903 };
1904
1905
1906 template <typename RT, typename ClassT,
1907 typename A, typename B, typename C, typename D,
1908 typename E, typename F
1909 >
1910 inline member_function_ptr<RT, ClassT, A, B, C, D, E, F>
1911 bind(RT(ClassT::*fptr)(A, B, C, D, E, F))
1912 {
1913 return member_function_ptr<
1914 RT, ClassT, A, B, C, D, E, F>(fptr);
1915 }
1916
1917
1918 template <typename RT, typename ClassT,
1919 typename A, typename B, typename C, typename D,
1920 typename E, typename F
1921 >
1922 inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F>
1923 bind(RT(ClassT::*fptr)(A, B, C, D, E, F) const)
1924 {
1925 return member_function_ptr<
1926 RT, ClassT const, A, B, C, D, E, F>(fptr);
1927 }
1928
1929
1930
1931
1932
1933
1934 template <typename RT, typename ClassT,
1935 typename A, typename B, typename C, typename D,
1936 typename E, typename F, typename G
1937 >
1938 struct member_function_ptr_action<RT, ClassT,
1939 A, B, C, D, E, F, G, nil_t, nil_t,
1940 #if PHOENIX_LIMIT > 9
1941 nil_t, nil_t, nil_t,
1942 #if PHOENIX_LIMIT > 12
1943 nil_t, nil_t, nil_t,
1944 #endif
1945 #endif
1946 nil_t
1947 > {
1948
1949 typedef RT result_type;
1950 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G);
1951 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G) const;
1952 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1953 mem_func_ptr_t;
1954
1955 template <typename CT,
1956 typename A_, typename B_, typename C_, typename D_,
1957 typename E_, typename F_, typename G_
1958 >
1959 struct result { typedef result_type type; };
1960
1961 member_function_ptr_action(mem_func_ptr_t fptr_)
1962 : fptr(fptr_) {}
1963
1964 template <typename CT>
1965 result_type operator()(CT& obj,
1966 A a, B b, C c, D d, E e, F f, G g
1967 ) const
1968 { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c, d, e, f, g); }
1969
1970 mem_func_ptr_t fptr;
1971 };
1972
1973
1974 template <typename RT, typename ClassT,
1975 typename A, typename B, typename C, typename D,
1976 typename E, typename F, typename G
1977 >
1978 inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G>
1979 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G))
1980 {
1981 return member_function_ptr<
1982 RT, ClassT, A, B, C, D, E, F, G>(fptr);
1983 }
1984
1985
1986 template <typename RT, typename ClassT,
1987 typename A, typename B, typename C, typename D,
1988 typename E, typename F, typename G
1989 >
1990 inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G>
1991 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G) const)
1992 {
1993 return member_function_ptr<
1994 RT, ClassT const, A, B, C, D, E, F, G>(fptr);
1995 }
1996
1997
1998
1999
2000
2001
2002 template <typename RT, typename ClassT,
2003 typename A, typename B, typename C, typename D,
2004 typename E, typename F, typename G, typename H
2005 >
2006 struct member_function_ptr_action<RT, ClassT,
2007 A, B, C, D, E, F, G, H, nil_t,
2008 #if PHOENIX_LIMIT > 9
2009 nil_t, nil_t, nil_t,
2010 #if PHOENIX_LIMIT > 12
2011 nil_t, nil_t, nil_t,
2012 #endif
2013 #endif
2014 nil_t
2015 > {
2016
2017 typedef RT result_type;
2018 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H);
2019 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H) const;
2020 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
2021 mem_func_ptr_t;
2022
2023 template <typename CT,
2024 typename A_, typename B_, typename C_, typename D_,
2025 typename E_, typename F_, typename G_, typename H_
2026 >
2027 struct result { typedef result_type type; };
2028
2029 member_function_ptr_action(mem_func_ptr_t fptr_)
2030 : fptr(fptr_) {}
2031
2032 template <typename CT>
2033 result_type operator()(CT& obj,
2034 A a, B b, C c, D d, E e, F f, G g, H h
2035 ) const
2036 { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c, d, e, f, g, h); }
2037
2038 mem_func_ptr_t fptr;
2039 };
2040
2041
2042 template <typename RT, typename ClassT,
2043 typename A, typename B, typename C, typename D,
2044 typename E, typename F, typename G, typename H
2045 >
2046 inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H>
2047 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H))
2048 {
2049 return member_function_ptr<
2050 RT, ClassT, A, B, C, D, E, F, G, H>(fptr);
2051 }
2052
2053
2054 template <typename RT, typename ClassT,
2055 typename A, typename B, typename C, typename D,
2056 typename E, typename F, typename G, typename H
2057 >
2058 inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H>
2059 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H) const)
2060 {
2061 return member_function_ptr<
2062 RT, ClassT const, A, B, C, D, E, F, G, H>(fptr);
2063 }
2064
2065 #if PHOENIX_LIMIT > 9
2066
2067
2068
2069
2070
2071 template <typename RT, typename ClassT,
2072 typename A, typename B, typename C, typename D,
2073 typename E, typename F, typename G, typename H, typename I
2074 >
2075 struct member_function_ptr_action<RT, ClassT,
2076 A, B, C, D, E, F, G, H, I, nil_t, nil_t, nil_t,
2077 #if PHOENIX_LIMIT > 12
2078 nil_t, nil_t, nil_t,
2079 #endif
2080 nil_t
2081 > {
2082
2083 typedef RT result_type;
2084 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I);
2085 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I) const;
2086 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
2087 mem_func_ptr_t;
2088
2089 template <typename CT,
2090 typename A_, typename B_, typename C_, typename D_,
2091 typename E_, typename F_, typename G_, typename H_, typename I_
2092 >
2093 struct result { typedef result_type type; };
2094
2095 member_function_ptr_action(mem_func_ptr_t fptr_)
2096 : fptr(fptr_) {}
2097
2098 template <typename CT>
2099 result_type operator()(CT& obj,
2100 A a, B b, C c, D d, E e, F f, G g, H h, I i
2101 ) const
2102 { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c, d, e, f, g, h, i); }
2103
2104 mem_func_ptr_t fptr;
2105 };
2106
2107
2108 template <typename RT, typename ClassT,
2109 typename A, typename B, typename C, typename D,
2110 typename E, typename F, typename G, typename H, typename I
2111 >
2112 inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I>
2113 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I))
2114 {
2115 return member_function_ptr<
2116 RT, ClassT, A, B, C, D, E, F, G, H, I>(fptr);
2117 }
2118
2119
2120 template <typename RT, typename ClassT,
2121 typename A, typename B, typename C, typename D,
2122 typename E, typename F, typename G, typename H, typename I
2123 >
2124 inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I>
2125 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I) const)
2126 {
2127 return member_function_ptr<
2128 RT, ClassT const, A, B, C, D, E, F, G, H, I>(fptr);
2129 }
2130
2131
2132
2133
2134
2135
2136 template <typename RT, typename ClassT,
2137 typename A, typename B, typename C, typename D,
2138 typename E, typename F, typename G, typename H, typename I,
2139 typename J
2140 >
2141 struct member_function_ptr_action<RT, ClassT,
2142 A, B, C, D, E, F, G, H, I, J, nil_t, nil_t,
2143 #if PHOENIX_LIMIT > 12
2144 nil_t, nil_t, nil_t,
2145 #endif
2146 nil_t
2147 > {
2148
2149 typedef RT result_type;
2150 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J);
2151 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J) const;
2152 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
2153 mem_func_ptr_t;
2154
2155 template <typename CT,
2156 typename A_, typename B_, typename C_, typename D_,
2157 typename E_, typename F_, typename G_, typename H_, typename I_,
2158 typename J_
2159 >
2160 struct result { typedef result_type type; };
2161
2162 member_function_ptr_action(mem_func_ptr_t fptr_)
2163 : fptr(fptr_) {}
2164
2165 template <typename CT>
2166 result_type operator()(CT& obj,
2167 A a, B b, C c, D d, E e, F f, G g, H h, I i, J j
2168 ) const
2169 {
2170 return (impl::as_ptr<CT>::get(obj)->*fptr)
2171 (a, b, c, d, e, f, g, h, i, j);
2172 }
2173
2174 mem_func_ptr_t fptr;
2175 };
2176
2177
2178 template <typename RT, typename ClassT,
2179 typename A, typename B, typename C, typename D,
2180 typename E, typename F, typename G, typename H, typename I,
2181 typename J
2182 >
2183 inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I, J>
2184 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J))
2185 {
2186 return member_function_ptr<
2187 RT, ClassT, A, B, C, D, E, F, G, H, I, J>(fptr);
2188 }
2189
2190
2191 template <typename RT, typename ClassT,
2192 typename A, typename B, typename C, typename D,
2193 typename E, typename F, typename G, typename H, typename I,
2194 typename J
2195 >
2196 inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I, J>
2197 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J) const)
2198 {
2199 return member_function_ptr<
2200 RT, ClassT const, A, B, C, D, E, F, G, H, I, J>(fptr);
2201 }
2202
2203
2204
2205
2206
2207
2208 template <typename RT, typename ClassT,
2209 typename A, typename B, typename C, typename D,
2210 typename E, typename F, typename G, typename H, typename I,
2211 typename J, typename K
2212 >
2213 struct member_function_ptr_action<RT, ClassT,
2214 A, B, C, D, E, F, G, H, I, J, K, nil_t,
2215 #if PHOENIX_LIMIT > 12
2216 nil_t, nil_t, nil_t,
2217 #endif
2218 nil_t
2219 > {
2220
2221 typedef RT result_type;
2222 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K);
2223 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K) const;
2224 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
2225 mem_func_ptr_t;
2226
2227 template <typename CT,
2228 typename A_, typename B_, typename C_, typename D_,
2229 typename E_, typename F_, typename G_, typename H_, typename I_,
2230 typename J_, typename K_
2231 >
2232 struct result { typedef result_type type; };
2233
2234 member_function_ptr_action(mem_func_ptr_t fptr_)
2235 : fptr(fptr_) {}
2236
2237 template <typename CT>
2238 result_type operator()(CT& obj,
2239 A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k
2240 ) const
2241 {
2242 return (impl::as_ptr<CT>::get(obj)->*fptr)
2243 (a, b, c, d, e, f, g, h, i, j, k);
2244 }
2245
2246 mem_func_ptr_t fptr;
2247 };
2248
2249
2250 template <typename RT, typename ClassT,
2251 typename A, typename B, typename C, typename D,
2252 typename E, typename F, typename G, typename H, typename I,
2253 typename J, typename K
2254 >
2255 inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K>
2256 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K))
2257 {
2258 return member_function_ptr<
2259 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K>(fptr);
2260 }
2261
2262
2263 template <typename RT, typename ClassT,
2264 typename A, typename B, typename C, typename D,
2265 typename E, typename F, typename G, typename H, typename I,
2266 typename J, typename K
2267 >
2268 inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K>
2269 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K) const)
2270 {
2271 return member_function_ptr<
2272 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K>(fptr);
2273 }
2274
2275 #if PHOENIX_LIMIT > 12
2276
2277
2278
2279
2280
2281 template <typename RT, typename ClassT,
2282 typename A, typename B, typename C, typename D,
2283 typename E, typename F, typename G, typename H, typename I,
2284 typename J, typename K, typename L
2285 >
2286 struct member_function_ptr_action<RT, ClassT,
2287 A, B, C, D, E, F, G, H, I, J, K, L, nil_t, nil_t, nil_t, nil_t> {
2288
2289 typedef RT result_type;
2290 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L);
2291 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L) const;
2292 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
2293 mem_func_ptr_t;
2294
2295 template <typename CT,
2296 typename A_, typename B_, typename C_, typename D_,
2297 typename E_, typename F_, typename G_, typename H_, typename I_,
2298 typename J_, typename K_, typename L_
2299 >
2300 struct result { typedef result_type type; };
2301
2302 member_function_ptr_action(mem_func_ptr_t fptr_)
2303 : fptr(fptr_) {}
2304
2305 template <typename CT>
2306 result_type operator()(CT& obj,
2307 A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l
2308 ) const
2309 {
2310 return (impl::as_ptr<CT>::get(obj)->*fptr)
2311 (a, b, c, d, e, f, g, h, i, j, k, l);
2312 }
2313
2314 mem_func_ptr_t fptr;
2315 };
2316
2317
2318 template <typename RT, typename ClassT,
2319 typename A, typename B, typename C, typename D,
2320 typename E, typename F, typename G, typename H, typename I,
2321 typename J, typename K, typename L
2322 >
2323 inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L>
2324 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L))
2325 {
2326 return member_function_ptr<
2327 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L>(fptr);
2328 }
2329
2330
2331 template <typename RT, typename ClassT,
2332 typename A, typename B, typename C, typename D,
2333 typename E, typename F, typename G, typename H, typename I,
2334 typename J, typename K, typename L
2335 >
2336 inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L>
2337 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L) const)
2338 {
2339 return member_function_ptr<
2340 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L>(fptr);
2341 }
2342
2343
2344
2345
2346
2347
2348 template <typename RT, typename ClassT,
2349 typename A, typename B, typename C, typename D,
2350 typename E, typename F, typename G, typename H, typename I,
2351 typename J, typename K, typename L, typename M
2352 >
2353 struct member_function_ptr_action<RT, ClassT,
2354 A, B, C, D, E, F, G, H, I, J, K, L, M, nil_t, nil_t, nil_t> {
2355
2356 typedef RT result_type;
2357 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L, M);
2358 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L, M) const;
2359 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
2360 mem_func_ptr_t;
2361
2362 template <typename CT,
2363 typename A_, typename B_, typename C_, typename D_,
2364 typename E_, typename F_, typename G_, typename H_, typename I_,
2365 typename J_, typename K_, typename L_, typename M_
2366 >
2367 struct result { typedef result_type type; };
2368
2369 member_function_ptr_action(mem_func_ptr_t fptr_)
2370 : fptr(fptr_) {}
2371
2372 template <typename CT>
2373 result_type operator()(CT& obj,
2374 A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m
2375 ) const
2376 {
2377 return (impl::as_ptr<CT>::get(obj)->*fptr)
2378 (a, b, c, d, e, f, g, h, i, j, k, l, m);
2379 }
2380
2381 mem_func_ptr_t fptr;
2382 };
2383
2384
2385 template <typename RT, typename ClassT,
2386 typename A, typename B, typename C, typename D,
2387 typename E, typename F, typename G, typename H, typename I,
2388 typename J, typename K, typename L, typename M
2389 >
2390 inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M>
2391 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M))
2392 {
2393 return member_function_ptr<
2394 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M>(fptr);
2395 }
2396
2397
2398 template <typename RT, typename ClassT,
2399 typename A, typename B, typename C, typename D,
2400 typename E, typename F, typename G, typename H, typename I,
2401 typename J, typename K, typename L, typename M
2402 >
2403 inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M>
2404 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M) const)
2405 {
2406 return member_function_ptr<
2407 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M>(fptr);
2408 }
2409
2410
2411
2412
2413
2414
2415 template <typename RT, typename ClassT,
2416 typename A, typename B, typename C, typename D,
2417 typename E, typename F, typename G, typename H, typename I,
2418 typename J, typename K, typename L, typename M, typename N
2419 >
2420 struct member_function_ptr_action<RT, ClassT,
2421 A, B, C, D, E, F, G, H, I, J, K, L, M, N, nil_t, nil_t> {
2422
2423 typedef RT result_type;
2424 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N);
2425 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N) const;
2426 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
2427 mem_func_ptr_t;
2428
2429 template <typename CT,
2430 typename A_, typename B_, typename C_, typename D_,
2431 typename E_, typename F_, typename G_, typename H_, typename I_,
2432 typename J_, typename K_, typename L_, typename M_, typename N_
2433 >
2434 struct result { typedef result_type type; };
2435
2436 member_function_ptr_action(mem_func_ptr_t fptr_)
2437 : fptr(fptr_) {}
2438
2439 template <typename CT>
2440 result_type operator()(CT& obj,
2441 A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n
2442 ) const
2443 {
2444 return (impl::as_ptr<CT>::get(obj)->*fptr)
2445 (a, b, c, d, e, f, g, h, i, j, k, l, m, n);
2446 }
2447
2448 mem_func_ptr_t fptr;
2449 };
2450
2451
2452 template <typename RT, typename ClassT,
2453 typename A, typename B, typename C, typename D,
2454 typename E, typename F, typename G, typename H, typename I,
2455 typename J, typename K, typename L, typename M, typename N
2456 >
2457 inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
2458 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N))
2459 {
2460 return member_function_ptr<
2461 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(fptr);
2462 }
2463
2464
2465 template <typename RT, typename ClassT,
2466 typename A, typename B, typename C, typename D,
2467 typename E, typename F, typename G, typename H, typename I,
2468 typename J, typename K, typename L, typename M, typename N
2469 >
2470 inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
2471 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N) const)
2472 {
2473 return member_function_ptr<
2474 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(fptr);
2475 }
2476
2477
2478
2479
2480
2481
2482 template <typename RT, typename ClassT,
2483 typename A, typename B, typename C, typename D,
2484 typename E, typename F, typename G, typename H, typename I,
2485 typename J, typename K, typename L, typename M, typename N,
2486 typename O
2487 >
2488 struct member_function_ptr_action<RT, ClassT,
2489 A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, nil_t> {
2490
2491 typedef RT result_type;
2492 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O);
2493 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) const;
2494 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
2495 mem_func_ptr_t;
2496
2497 template <typename CT,
2498 typename A_, typename B_, typename C_, typename D_,
2499 typename E_, typename F_, typename G_, typename H_, typename I_,
2500 typename J_, typename K_, typename L_, typename M_, typename N_,
2501 typename O_
2502 >
2503 struct result { typedef result_type type; };
2504
2505 member_function_ptr_action(mem_func_ptr_t fptr_)
2506 : fptr(fptr_) {}
2507
2508 template <typename CT>
2509 result_type operator()(CT& obj,
2510 A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o
2511 ) const
2512 {
2513 return (impl::as_ptr<CT>::get(obj)->*fptr)
2514 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
2515 }
2516
2517 mem_func_ptr_t fptr;
2518 };
2519
2520
2521 template <typename RT, typename ClassT,
2522 typename A, typename B, typename C, typename D,
2523 typename E, typename F, typename G, typename H, typename I,
2524 typename J, typename K, typename L, typename M, typename N,
2525 typename O
2526 >
2527 inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
2528 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O))
2529 {
2530 return member_function_ptr<
2531 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(fptr);
2532 }
2533
2534
2535 template <typename RT, typename ClassT,
2536 typename A, typename B, typename C, typename D,
2537 typename E, typename F, typename G, typename H, typename I,
2538 typename J, typename K, typename L, typename M, typename N,
2539 typename O
2540 >
2541 inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
2542 bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) const)
2543 {
2544 return member_function_ptr<
2545 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(fptr);
2546 }
2547
2548 #endif
2549 #endif
2550 #endif
2551 #endif
2552
2553
2554
2555
2556
2557
2558 template <
2559 typename RT,
2560 typename ClassT
2561 , typename A = nil_t
2562 , typename B = nil_t
2563 , typename C = nil_t
2564
2565 #if PHOENIX_LIMIT > 3
2566 , typename D = nil_t
2567 , typename E = nil_t
2568 , typename F = nil_t
2569
2570 #if PHOENIX_LIMIT > 6
2571 , typename G = nil_t
2572 , typename H = nil_t
2573 , typename I = nil_t
2574
2575 #if PHOENIX_LIMIT > 9
2576 , typename J = nil_t
2577 , typename K = nil_t
2578 , typename L = nil_t
2579
2580 #if PHOENIX_LIMIT > 12
2581 , typename M = nil_t
2582 , typename N = nil_t
2583 , typename O = nil_t
2584
2585 #endif
2586 #endif
2587 #endif
2588 #endif
2589
2590 , typename NU = nil_t
2591 >
2592 struct bound_member_action;
2593
2594
2595 template <
2596 typename RT,
2597 typename ClassT
2598 , typename A = nil_t
2599 , typename B = nil_t
2600 , typename C = nil_t
2601
2602 #if PHOENIX_LIMIT > 3
2603 , typename D = nil_t
2604 , typename E = nil_t
2605 , typename F = nil_t
2606
2607 #if PHOENIX_LIMIT > 6
2608 , typename G = nil_t
2609 , typename H = nil_t
2610 , typename I = nil_t
2611
2612 #if PHOENIX_LIMIT > 9
2613 , typename J = nil_t
2614 , typename K = nil_t
2615 , typename L = nil_t
2616
2617 #if PHOENIX_LIMIT > 12
2618 , typename M = nil_t
2619 , typename N = nil_t
2620 , typename O = nil_t
2621
2622 #endif
2623 #endif
2624 #endif
2625 #endif
2626 >
2627 struct bound_member
2628 : public function<bound_member_action<RT, ClassT
2629 , A, B, C
2630 #if PHOENIX_LIMIT > 3
2631 , D, E, F
2632 #if PHOENIX_LIMIT > 6
2633 , G, H, I
2634 #if PHOENIX_LIMIT > 9
2635 , J, K, L
2636 #if PHOENIX_LIMIT > 12
2637 , M, N, O
2638 #endif
2639 #endif
2640 #endif
2641 #endif
2642 > > {
2643
2644 typedef bound_member_action<RT, ClassT
2645 , A, B, C
2646 #if PHOENIX_LIMIT > 3
2647 , D, E, F
2648 #if PHOENIX_LIMIT > 6
2649 , G, H, I
2650 #if PHOENIX_LIMIT > 9
2651 , J, K, L
2652 #if PHOENIX_LIMIT > 12
2653 , M, N, O
2654 #endif
2655 #endif
2656 #endif
2657 #endif
2658 > action_t;
2659
2660 template <typename CT, typename FPT>
2661 bound_member(CT & c, FPT fp)
2662 : function<action_t>(action_t(c,fp)) {}
2663
2664 #if !defined(BOOST_BORLANDC)
2665 template <typename CT, typename FPT>
2666 bound_member(CT * c, FPT fp)
2667 : function<action_t>(action_t(c,fp)) {}
2668 #endif
2669 };
2670
2671
2672
2673
2674
2675
2676
2677 template <typename RT, typename ClassT>
2678 struct bound_member_action<RT, ClassT,
2679 nil_t, nil_t, nil_t,
2680 #if PHOENIX_LIMIT > 3
2681 nil_t, nil_t, nil_t,
2682 #if PHOENIX_LIMIT > 6
2683 nil_t, nil_t, nil_t,
2684 #if PHOENIX_LIMIT > 9
2685 nil_t, nil_t, nil_t,
2686 #if PHOENIX_LIMIT > 12
2687 nil_t, nil_t, nil_t,
2688 #endif
2689 #endif
2690 #endif
2691 #endif
2692 nil_t
2693 > {
2694
2695 typedef RT result_type;
2696 typedef RT(ClassT::*mf)();
2697 typedef RT(ClassT::*cmf)() const;
2698 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
2699 mem_func_ptr_t;
2700
2701 template <typename CT>
2702 struct result { typedef result_type type; };
2703
2704 template <typename CT>
2705 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
2706 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
2707
2708 result_type operator()() const
2709 { return (obj->*fptr)(); }
2710
2711 typename impl::as_ptr<ClassT>::pointer_type obj;
2712 mem_func_ptr_t fptr;
2713 };
2714
2715
2716
2717 template <typename RT, typename ClassT>
2718 inline bound_member<RT,ClassT>
2719 bind(ClassT & obj, RT(ClassT::*fptr)())
2720 {
2721 return bound_member<RT,ClassT>(obj, fptr);
2722 }
2723
2724 template <typename RT, typename ClassT>
2725 inline bound_member<RT,ClassT>
2726 bind(ClassT * obj, RT(ClassT::*fptr)())
2727 {
2728 #if defined(__MWERKS__) && (__MWERKS__ < 0x3003)
2729 return bound_member<RT,ClassT>(*obj, fptr);
2730 #else
2731 return bound_member<RT,ClassT>(obj, fptr);
2732 #endif
2733 }
2734
2735 template <typename RT, typename ClassT>
2736 inline bound_member<RT,ClassT const>
2737 bind(ClassT const& obj, RT(ClassT::*fptr)())
2738 {
2739 return bound_member<RT,ClassT const>(obj, fptr);
2740 }
2741
2742 template <typename RT, typename ClassT>
2743 inline bound_member<RT,ClassT const>
2744 bind(ClassT const* obj, RT(ClassT::*fptr)() const)
2745 {
2746 #if defined(__MWERKS__) && (__MWERKS__ < 0x3003)
2747 return bound_member<RT,ClassT const>(*obj, fptr);
2748 #else
2749 return bound_member<RT,ClassT const>(obj, fptr);
2750 #endif
2751 }
2752
2753
2754
2755
2756
2757
2758 template <typename RT, typename ClassT, typename A>
2759 struct bound_member_action<RT, ClassT,
2760 A, nil_t, nil_t,
2761 #if PHOENIX_LIMIT > 3
2762 nil_t, nil_t, nil_t,
2763 #if PHOENIX_LIMIT > 6
2764 nil_t, nil_t, nil_t,
2765 #if PHOENIX_LIMIT > 9
2766 nil_t, nil_t, nil_t,
2767 #if PHOENIX_LIMIT > 12
2768 nil_t, nil_t, nil_t,
2769 #endif
2770 #endif
2771 #endif
2772 #endif
2773 nil_t
2774 > {
2775
2776 typedef RT result_type;
2777 typedef RT(ClassT::*mf)(A);
2778 typedef RT(ClassT::*cmf)(A) const;
2779 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
2780 mem_func_ptr_t;
2781
2782 template <typename A_>
2783 struct result { typedef result_type type; };
2784
2785 template <typename CT>
2786 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
2787 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
2788
2789 result_type operator()(A a) const
2790 { return (obj->*fptr)(a); }
2791
2792 typename impl::as_ptr<ClassT>::pointer_type obj;
2793 mem_func_ptr_t fptr;
2794 };
2795
2796
2797 template <typename RT, typename ClassT, typename A>
2798 inline bound_member<RT, ClassT, A>
2799 bind(ClassT & obj, RT(ClassT::*fptr)(A))
2800 {
2801 return bound_member<RT, ClassT, A>(obj,fptr);
2802 }
2803
2804 template <typename RT, typename ClassT, typename A>
2805 inline bound_member<RT, ClassT, A>
2806 bind(ClassT * obj, RT(ClassT::*fptr)(A))
2807 {
2808 return bound_member<RT, ClassT, A>(obj,fptr);
2809 }
2810
2811
2812 template <typename RT, typename ClassT, typename A>
2813 inline bound_member<RT, ClassT const, A>
2814 bind(ClassT const& obj, RT(ClassT::*fptr)(A) const)
2815 {
2816 return bound_member<RT, ClassT const, A>(obj,fptr);
2817 }
2818
2819 template <typename RT, typename ClassT, typename A>
2820 inline bound_member<RT, ClassT const, A>
2821 bind(ClassT const* obj, RT(ClassT::*fptr)(A) const)
2822 {
2823 return bound_member<RT, ClassT const, A>(obj,fptr);
2824 }
2825
2826
2827
2828
2829
2830
2831 template <typename RT, typename ClassT, typename A, typename B>
2832 struct bound_member_action<RT, ClassT,
2833 A, B, nil_t,
2834 #if PHOENIX_LIMIT > 3
2835 nil_t, nil_t, nil_t,
2836 #if PHOENIX_LIMIT > 6
2837 nil_t, nil_t, nil_t,
2838 #if PHOENIX_LIMIT > 9
2839 nil_t, nil_t, nil_t,
2840 #if PHOENIX_LIMIT > 12
2841 nil_t, nil_t, nil_t,
2842 #endif
2843 #endif
2844 #endif
2845 #endif
2846 nil_t
2847 > {
2848
2849 typedef RT result_type;
2850 typedef RT(ClassT::*mf)(A, B);
2851 typedef RT(ClassT::*cmf)(A, B) const;
2852 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
2853 mem_func_ptr_t;
2854
2855 template <typename A_, typename B_>
2856 struct result { typedef result_type type; };
2857
2858 template <typename CT>
2859 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
2860 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
2861
2862 result_type operator()(A a, B b) const
2863 { return (obj->*fptr)(a, b); }
2864
2865 typename impl::as_ptr<ClassT>::pointer_type obj;
2866 mem_func_ptr_t fptr;
2867 };
2868
2869
2870 template <typename RT, typename ClassT, typename A, typename B>
2871 inline bound_member<RT, ClassT, A, B>
2872 bind(ClassT & obj,RT(ClassT::*fptr)(A, B))
2873 {
2874 return bound_member<RT, ClassT, A, B>(obj,fptr);
2875 }
2876
2877 template <typename RT, typename ClassT, typename A, typename B>
2878 inline bound_member<RT, ClassT, A, B>
2879 bind(ClassT * obj,RT(ClassT::*fptr)(A, B))
2880 {
2881 return bound_member<RT, ClassT, A, B>(obj,fptr);
2882 }
2883
2884 template <typename RT, typename ClassT, typename A, typename B>
2885 inline bound_member<RT, ClassT const, A, B>
2886 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B) const)
2887 {
2888 return bound_member<RT, ClassT const, A, B>(obj,fptr);
2889 }
2890
2891 template <typename RT, typename ClassT, typename A, typename B>
2892 inline bound_member<RT, ClassT const, A, B>
2893 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B) const)
2894 {
2895 return bound_member<RT, ClassT const, A, B>(obj,fptr);
2896 }
2897
2898 #if PHOENIX_LIMIT > 3
2899
2900
2901
2902
2903
2904 template <typename RT, typename ClassT, typename A, typename B, typename C>
2905 struct bound_member_action<RT, ClassT,
2906 A, B, C, nil_t, nil_t, nil_t,
2907 #if PHOENIX_LIMIT > 6
2908 nil_t, nil_t, nil_t,
2909 #if PHOENIX_LIMIT > 9
2910 nil_t, nil_t, nil_t,
2911 #if PHOENIX_LIMIT > 12
2912 nil_t, nil_t, nil_t,
2913 #endif
2914 #endif
2915 #endif
2916 nil_t
2917 > {
2918
2919 typedef RT result_type;
2920 typedef RT(ClassT::*mf)(A, B, C);
2921 typedef RT(ClassT::*cmf)(A, B, C) const;
2922 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
2923 mem_func_ptr_t;
2924
2925 template <typename A_, typename B_, typename C_>
2926 struct result { typedef result_type type; };
2927
2928 template <typename CT>
2929 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
2930 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
2931
2932 result_type operator()(A a, B b, C c) const
2933 { return (obj->*fptr)(a, b, c); }
2934
2935 typename impl::as_ptr<ClassT>::pointer_type obj;
2936 mem_func_ptr_t fptr;
2937 };
2938
2939
2940 template <typename RT, typename ClassT, typename A, typename B, typename C>
2941 inline bound_member<RT, ClassT, A, B, C>
2942 bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C))
2943 {
2944 return bound_member<RT, ClassT, A, B, C>(obj,fptr);
2945 }
2946
2947 template <typename RT, typename ClassT, typename A, typename B, typename C>
2948 inline bound_member<RT, ClassT, A, B, C>
2949 bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C))
2950 {
2951 return bound_member<RT, ClassT, A, B, C>(obj,fptr);
2952 }
2953
2954 template <typename RT, typename ClassT, typename A, typename B, typename C>
2955 inline bound_member<RT, ClassT const, A, B, C>
2956 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C) const)
2957 {
2958 return bound_member<RT, ClassT const, A, B, C>(obj,fptr);
2959 }
2960
2961 template <typename RT, typename ClassT, typename A, typename B, typename C>
2962 inline bound_member<RT, ClassT const, A, B, C>
2963 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C) const)
2964 {
2965 return bound_member<RT, ClassT const, A, B, C>(obj,fptr);
2966 }
2967
2968
2969
2970
2971
2972
2973 template <typename RT, typename ClassT,
2974 typename A, typename B, typename C, typename D
2975 >
2976 struct bound_member_action<RT, ClassT,
2977 A, B, C, D, nil_t, nil_t,
2978 #if PHOENIX_LIMIT > 6
2979 nil_t, nil_t, nil_t,
2980 #if PHOENIX_LIMIT > 9
2981 nil_t, nil_t, nil_t,
2982 #if PHOENIX_LIMIT > 12
2983 nil_t, nil_t, nil_t,
2984 #endif
2985 #endif
2986 #endif
2987 nil_t
2988 > {
2989
2990 typedef RT result_type;
2991 typedef RT(ClassT::*mf)(A, B, C, D);
2992 typedef RT(ClassT::*cmf)(A, B, C, D) const;
2993 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
2994 mem_func_ptr_t;
2995
2996 template <typename A_, typename B_, typename C_, typename D_>
2997 struct result { typedef result_type type; };
2998
2999 template <typename CT>
3000 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
3001 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
3002
3003 result_type operator()(A a, B b, C c, D d) const
3004 { return (obj->*fptr)(a, b, c, d); }
3005
3006 typename impl::as_ptr<ClassT>::pointer_type obj;
3007 mem_func_ptr_t fptr;
3008 };
3009
3010
3011 template <typename RT, typename ClassT,
3012 typename A, typename B, typename C, typename D
3013 >
3014 inline bound_member<RT, ClassT, A, B, C, D>
3015 bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D))
3016 {
3017 return bound_member<
3018 RT, ClassT, A, B, C, D>(obj,fptr);
3019 }
3020
3021 template <typename RT, typename ClassT,
3022 typename A, typename B, typename C, typename D
3023 >
3024 inline bound_member<RT, ClassT, A, B, C, D>
3025 bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D))
3026 {
3027 return bound_member<
3028 RT, ClassT, A, B, C, D>(obj,fptr);
3029 }
3030
3031 template <typename RT, typename ClassT,
3032 typename A, typename B, typename C, typename D
3033 >
3034 inline bound_member<RT, ClassT const, A, B, C, D>
3035 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D) const)
3036 {
3037 return bound_member<
3038 RT, ClassT const, A, B, C, D>(obj,fptr);
3039 }
3040
3041 template <typename RT, typename ClassT,
3042 typename A, typename B, typename C, typename D
3043 >
3044 inline bound_member<RT, ClassT const, A, B, C, D>
3045 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D) const)
3046 {
3047 return bound_member<
3048 RT, ClassT const, A, B, C, D>(obj,fptr);
3049 }
3050
3051
3052
3053
3054
3055
3056 template <typename RT, typename ClassT,
3057 typename A, typename B, typename C, typename D,
3058 typename E
3059 >
3060 struct bound_member_action<RT, ClassT,
3061 A, B, C, D, E, nil_t,
3062 #if PHOENIX_LIMIT > 6
3063 nil_t, nil_t, nil_t,
3064 #if PHOENIX_LIMIT > 9
3065 nil_t, nil_t, nil_t,
3066 #if PHOENIX_LIMIT > 12
3067 nil_t, nil_t, nil_t,
3068 #endif
3069 #endif
3070 #endif
3071 nil_t
3072 > {
3073
3074 typedef RT result_type;
3075 typedef RT(ClassT::*mf)(A, B, C, D, E);
3076 typedef RT(ClassT::*cmf)(A, B, C, D, E) const;
3077 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
3078 mem_func_ptr_t;
3079
3080 template <typename A_, typename B_, typename C_, typename D_,
3081 typename E_
3082 >
3083 struct result { typedef result_type type; };
3084
3085 template <typename CT>
3086 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
3087 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
3088
3089 result_type operator()(
3090 A a, B b, C c, D d, E e
3091 ) const
3092 { return (obj->*fptr)(a, b, c, d, e); }
3093
3094 typename impl::as_ptr<ClassT>::pointer_type obj;
3095 mem_func_ptr_t fptr;
3096 };
3097
3098
3099 template <typename RT, typename ClassT,
3100 typename A, typename B, typename C, typename D,
3101 typename E
3102 >
3103 inline bound_member<RT, ClassT, A, B, C, D, E>
3104 bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E))
3105 {
3106 return bound_member<
3107 RT, ClassT, A, B, C, D, E>(obj,fptr);
3108 }
3109
3110 template <typename RT, typename ClassT,
3111 typename A, typename B, typename C, typename D,
3112 typename E
3113 >
3114 inline bound_member<RT, ClassT, A, B, C, D, E>
3115 bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E))
3116 {
3117 return bound_member<
3118 RT, ClassT, A, B, C, D, E>(obj,fptr);
3119 }
3120
3121 template <typename RT, typename ClassT,
3122 typename A, typename B, typename C, typename D,
3123 typename E
3124 >
3125 inline bound_member<RT, ClassT const, A, B, C, D, E>
3126 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E) const)
3127 {
3128 return bound_member<
3129 RT, ClassT const, A, B, C, D, E>(obj,fptr);
3130 }
3131
3132 template <typename RT, typename ClassT,
3133 typename A, typename B, typename C, typename D,
3134 typename E
3135 >
3136 inline bound_member<RT, ClassT const, A, B, C, D, E>
3137 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E) const)
3138 {
3139 return bound_member<
3140 RT, ClassT const, A, B, C, D, E>(obj,fptr);
3141 }
3142
3143 #if PHOENIX_LIMIT > 6
3144
3145
3146
3147
3148
3149 template <typename RT, typename ClassT,
3150 typename A, typename B, typename C, typename D,
3151 typename E, typename F
3152 >
3153 struct bound_member_action<RT, ClassT,
3154 A, B, C, D, E, F, nil_t, nil_t, nil_t,
3155 #if PHOENIX_LIMIT > 9
3156 nil_t, nil_t, nil_t,
3157 #if PHOENIX_LIMIT > 12
3158 nil_t, nil_t, nil_t,
3159 #endif
3160 #endif
3161 nil_t
3162 > {
3163
3164 typedef RT result_type;
3165 typedef RT(ClassT::*mf)(A, B, C, D, E, F);
3166 typedef RT(ClassT::*cmf)(A, B, C, D, E, F) const;
3167 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
3168 mem_func_ptr_t;
3169
3170 template <
3171 typename A_, typename B_, typename C_, typename D_,
3172 typename E_, typename F_
3173 >
3174 struct result { typedef result_type type; };
3175
3176 template <typename CT>
3177 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
3178 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
3179
3180 result_type operator()(
3181 A a, B b, C c, D d, E e, F f
3182 ) const
3183 { return (obj->*fptr)(a, b, c, d, e, f); }
3184
3185 typename impl::as_ptr<ClassT>::pointer_type obj;
3186 mem_func_ptr_t fptr;
3187 };
3188
3189
3190 template <typename RT, typename ClassT,
3191 typename A, typename B, typename C, typename D,
3192 typename E, typename F
3193 >
3194 inline bound_member<RT, ClassT, A, B, C, D, E, F>
3195 bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F))
3196 {
3197 return bound_member<
3198 RT, ClassT, A, B, C, D, E, F>(obj,fptr);
3199 }
3200
3201 template <typename RT, typename ClassT,
3202 typename A, typename B, typename C, typename D,
3203 typename E, typename F
3204 >
3205 inline bound_member<RT, ClassT, A, B, C, D, E, F>
3206 bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F))
3207 {
3208 return bound_member<
3209 RT, ClassT, A, B, C, D, E, F>(obj,fptr);
3210 }
3211
3212 template <typename RT, typename ClassT,
3213 typename A, typename B, typename C, typename D,
3214 typename E, typename F
3215 >
3216 inline bound_member<RT, ClassT const, A, B, C, D, E, F>
3217 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F) const)
3218 {
3219 return bound_member<
3220 RT, ClassT const, A, B, C, D, E, F>(obj,fptr);
3221 }
3222
3223 template <typename RT, typename ClassT,
3224 typename A, typename B, typename C, typename D,
3225 typename E, typename F
3226 >
3227 inline bound_member<RT, ClassT const, A, B, C, D, E, F>
3228 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F) const)
3229 {
3230 return bound_member<
3231 RT, ClassT const, A, B, C, D, E, F>(obj,fptr);
3232 }
3233
3234
3235
3236
3237
3238
3239 template <typename RT, typename ClassT,
3240 typename A, typename B, typename C, typename D,
3241 typename E, typename F, typename G
3242 >
3243 struct bound_member_action<RT, ClassT,
3244 A, B, C, D, E, F, G, nil_t, nil_t,
3245 #if PHOENIX_LIMIT > 9
3246 nil_t, nil_t, nil_t,
3247 #if PHOENIX_LIMIT > 12
3248 nil_t, nil_t, nil_t,
3249 #endif
3250 #endif
3251 nil_t
3252 > {
3253
3254 typedef RT result_type;
3255 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G);
3256 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G) const;
3257 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
3258 mem_func_ptr_t;
3259
3260 template <
3261 typename A_, typename B_, typename C_, typename D_,
3262 typename E_, typename F_, typename G_
3263 >
3264 struct result { typedef result_type type; };
3265
3266 template <typename CT>
3267 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
3268 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
3269
3270 result_type operator()(
3271 A a, B b, C c, D d, E e, F f, G g
3272 ) const
3273 { return (obj->*fptr)(a, b, c, d, e, f, g); }
3274
3275 typename impl::as_ptr<ClassT>::pointer_type obj;
3276 mem_func_ptr_t fptr;
3277 };
3278
3279
3280 template <typename RT, typename ClassT,
3281 typename A, typename B, typename C, typename D,
3282 typename E, typename F, typename G
3283 >
3284 inline bound_member<RT, ClassT, A, B, C, D, E, F, G>
3285 bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G))
3286 {
3287 return bound_member<
3288 RT, ClassT, A, B, C, D, E, F, G>(obj,fptr);
3289 }
3290
3291 template <typename RT, typename ClassT,
3292 typename A, typename B, typename C, typename D,
3293 typename E, typename F, typename G
3294 >
3295 inline bound_member<RT, ClassT, A, B, C, D, E, F, G>
3296 bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G))
3297 {
3298 return bound_member<
3299 RT, ClassT, A, B, C, D, E, F, G>(obj,fptr);
3300 }
3301
3302 template <typename RT, typename ClassT,
3303 typename A, typename B, typename C, typename D,
3304 typename E, typename F, typename G
3305 >
3306 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G>
3307 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G) const)
3308 {
3309 return bound_member<
3310 RT, ClassT const, A, B, C, D, E, F, G>(obj,fptr);
3311 }
3312
3313 template <typename RT, typename ClassT,
3314 typename A, typename B, typename C, typename D,
3315 typename E, typename F, typename G
3316 >
3317 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G>
3318 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G) const)
3319 {
3320 return bound_member<
3321 RT, ClassT const, A, B, C, D, E, F, G>(obj,fptr);
3322 }
3323
3324
3325
3326
3327
3328
3329 template <typename RT, typename ClassT,
3330 typename A, typename B, typename C, typename D,
3331 typename E, typename F, typename G, typename H
3332 >
3333 struct bound_member_action<RT, ClassT,
3334 A, B, C, D, E, F, G, H, nil_t,
3335 #if PHOENIX_LIMIT > 9
3336 nil_t, nil_t, nil_t,
3337 #if PHOENIX_LIMIT > 12
3338 nil_t, nil_t, nil_t,
3339 #endif
3340 #endif
3341 nil_t
3342 > {
3343
3344 typedef RT result_type;
3345 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H);
3346 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H) const;
3347 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
3348 mem_func_ptr_t;
3349
3350 template <
3351 typename A_, typename B_, typename C_, typename D_,
3352 typename E_, typename F_, typename G_, typename H_
3353 >
3354 struct result { typedef result_type type; };
3355
3356 template <typename CT>
3357 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
3358 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
3359
3360 result_type operator()(
3361 A a, B b, C c, D d, E e, F f, G g, H h
3362 ) const
3363 { return (obj->*fptr)(a, b, c, d, e, f, g, h); }
3364
3365 typename impl::as_ptr<ClassT>::pointer_type obj;
3366 mem_func_ptr_t fptr;
3367 };
3368
3369
3370 template <typename RT, typename ClassT,
3371 typename A, typename B, typename C, typename D,
3372 typename E, typename F, typename G, typename H
3373 >
3374 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H>
3375 bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H))
3376 {
3377 return bound_member<
3378 RT, ClassT, A, B, C, D, E, F, G, H>(obj,fptr);
3379 }
3380
3381 template <typename RT, typename ClassT,
3382 typename A, typename B, typename C, typename D,
3383 typename E, typename F, typename G, typename H
3384 >
3385 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H>
3386 bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H))
3387 {
3388 return bound_member<
3389 RT, ClassT, A, B, C, D, E, F, G, H>(obj,fptr);
3390 }
3391
3392 template <typename RT, typename ClassT,
3393 typename A, typename B, typename C, typename D,
3394 typename E, typename F, typename G, typename H
3395 >
3396 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H>
3397 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H) const)
3398 {
3399 return bound_member<
3400 RT, ClassT const, A, B, C, D, E, F, G, H>(obj,fptr);
3401 }
3402
3403 template <typename RT, typename ClassT,
3404 typename A, typename B, typename C, typename D,
3405 typename E, typename F, typename G, typename H
3406 >
3407 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H>
3408 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H) const)
3409 {
3410 return bound_member<
3411 RT, ClassT const, A, B, C, D, E, F, G, H>(obj,fptr);
3412 }
3413
3414 #if PHOENIX_LIMIT > 9
3415
3416
3417
3418
3419
3420 template <typename RT, typename ClassT,
3421 typename A, typename B, typename C, typename D,
3422 typename E, typename F, typename G, typename H, typename I
3423 >
3424 struct bound_member_action<RT, ClassT,
3425 A, B, C, D, E, F, G, H, I, nil_t, nil_t, nil_t,
3426 #if PHOENIX_LIMIT > 12
3427 nil_t, nil_t, nil_t,
3428 #endif
3429 nil_t
3430 > {
3431
3432 typedef RT result_type;
3433 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I);
3434 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I) const;
3435 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
3436 mem_func_ptr_t;
3437
3438 template <
3439 typename A_, typename B_, typename C_, typename D_,
3440 typename E_, typename F_, typename G_, typename H_, typename I_
3441 >
3442 struct result { typedef result_type type; };
3443
3444 template <typename CT>
3445 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
3446 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
3447
3448 result_type operator()(
3449 A a, B b, C c, D d, E e, F f, G g, H h, I i
3450 ) const
3451 { return (obj->*fptr)(a, b, c, d, e, f, g, h, i); }
3452
3453 typename impl::as_ptr<ClassT>::pointer_type obj;
3454 mem_func_ptr_t fptr;
3455 };
3456
3457
3458 template <typename RT, typename ClassT,
3459 typename A, typename B, typename C, typename D,
3460 typename E, typename F, typename G, typename H, typename I
3461 >
3462 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I>
3463 bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I))
3464 {
3465 return bound_member<
3466 RT, ClassT, A, B, C, D, E, F, G, H, I>(obj,fptr);
3467 }
3468
3469 template <typename RT, typename ClassT,
3470 typename A, typename B, typename C, typename D,
3471 typename E, typename F, typename G, typename H, typename I
3472 >
3473 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I>
3474 bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I))
3475 {
3476 return bound_member<
3477 RT, ClassT, A, B, C, D, E, F, G, H, I>(obj,fptr);
3478 }
3479
3480 template <typename RT, typename ClassT,
3481 typename A, typename B, typename C, typename D,
3482 typename E, typename F, typename G, typename H, typename I
3483 >
3484 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I>
3485 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I) const)
3486 {
3487 return bound_member<
3488 RT, ClassT const, A, B, C, D, E, F, G, H, I>(obj,fptr);
3489 }
3490
3491 template <typename RT, typename ClassT,
3492 typename A, typename B, typename C, typename D,
3493 typename E, typename F, typename G, typename H, typename I
3494 >
3495 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I>
3496 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I) const)
3497 {
3498 return bound_member<
3499 RT, ClassT const, A, B, C, D, E, F, G, H, I>(obj,fptr);
3500 }
3501
3502
3503
3504
3505
3506
3507 template <typename RT, typename ClassT,
3508 typename A, typename B, typename C, typename D,
3509 typename E, typename F, typename G, typename H, typename I,
3510 typename J
3511 >
3512 struct bound_member_action<RT, ClassT,
3513 A, B, C, D, E, F, G, H, I, J, nil_t, nil_t,
3514 #if PHOENIX_LIMIT > 12
3515 nil_t, nil_t, nil_t,
3516 #endif
3517 nil_t
3518 > {
3519
3520 typedef RT result_type;
3521 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J);
3522 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J) const;
3523 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
3524 mem_func_ptr_t;
3525
3526 template <
3527 typename A_, typename B_, typename C_, typename D_,
3528 typename E_, typename F_, typename G_, typename H_, typename I_,
3529 typename J_
3530 >
3531 struct result { typedef result_type type; };
3532
3533 template <typename CT>
3534 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
3535 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
3536
3537 result_type operator()(
3538 A a, B b, C c, D d, E e, F f, G g, H h, I i, J j
3539 ) const
3540 {
3541 return (obj->*fptr)(a, b, c, d, e, f, g, h, i, j);
3542 }
3543
3544 typename impl::as_ptr<ClassT>::pointer_type obj;
3545 mem_func_ptr_t fptr;
3546 };
3547
3548
3549 template <typename RT, typename ClassT,
3550 typename A, typename B, typename C, typename D,
3551 typename E, typename F, typename G, typename H, typename I,
3552 typename J
3553 >
3554 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J>
3555 bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J))
3556 {
3557 return bound_member<
3558 RT, ClassT, A, B, C, D, E, F, G, H, I, J>(obj,fptr);
3559 }
3560
3561 template <typename RT, typename ClassT,
3562 typename A, typename B, typename C, typename D,
3563 typename E, typename F, typename G, typename H, typename I,
3564 typename J
3565 >
3566 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J>
3567 bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J))
3568 {
3569 return bound_member<
3570 RT, ClassT, A, B, C, D, E, F, G, H, I, J>(obj,fptr);
3571 }
3572
3573 template <typename RT, typename ClassT,
3574 typename A, typename B, typename C, typename D,
3575 typename E, typename F, typename G, typename H, typename I,
3576 typename J
3577 >
3578 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J>
3579 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J) const)
3580 {
3581 return bound_member<
3582 RT, ClassT const, A, B, C, D, E, F, G, H, I, J>(obj,fptr);
3583 }
3584
3585 template <typename RT, typename ClassT,
3586 typename A, typename B, typename C, typename D,
3587 typename E, typename F, typename G, typename H, typename I,
3588 typename J
3589 >
3590 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J>
3591 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J) const)
3592 {
3593 return bound_member<
3594 RT, ClassT const, A, B, C, D, E, F, G, H, I, J>(obj,fptr);
3595 }
3596
3597
3598
3599
3600
3601
3602 template <typename RT, typename ClassT,
3603 typename A, typename B, typename C, typename D,
3604 typename E, typename F, typename G, typename H, typename I,
3605 typename J, typename K
3606 >
3607 struct bound_member_action<RT, ClassT,
3608 A, B, C, D, E, F, G, H, I, J, K, nil_t,
3609 #if PHOENIX_LIMIT > 12
3610 nil_t, nil_t, nil_t,
3611 #endif
3612 nil_t
3613 > {
3614
3615 typedef RT result_type;
3616 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K);
3617 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K) const;
3618 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
3619 mem_func_ptr_t;
3620
3621 template <
3622 typename A_, typename B_, typename C_, typename D_,
3623 typename E_, typename F_, typename G_, typename H_, typename I_,
3624 typename J_, typename K_
3625 >
3626 struct result { typedef result_type type; };
3627
3628 template <typename CT>
3629 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
3630 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
3631
3632 result_type operator()(
3633 A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k
3634 ) const
3635 {
3636 return (obj->*fptr)(a, b, c, d, e, f, g, h, i, j, k);
3637 }
3638
3639 typename impl::as_ptr<ClassT>::pointer_type obj;
3640 mem_func_ptr_t fptr;
3641 };
3642
3643
3644 template <typename RT, typename ClassT,
3645 typename A, typename B, typename C, typename D,
3646 typename E, typename F, typename G, typename H, typename I,
3647 typename J, typename K
3648 >
3649 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K>
3650 bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K))
3651 {
3652 return bound_member<
3653 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K>(obj,fptr);
3654 }
3655
3656 template <typename RT, typename ClassT,
3657 typename A, typename B, typename C, typename D,
3658 typename E, typename F, typename G, typename H, typename I,
3659 typename J, typename K
3660 >
3661 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K>
3662 bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K))
3663 {
3664 return bound_member<
3665 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K>(obj,fptr);
3666 }
3667
3668 template <typename RT, typename ClassT,
3669 typename A, typename B, typename C, typename D,
3670 typename E, typename F, typename G, typename H, typename I,
3671 typename J, typename K
3672 >
3673 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K>
3674 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K) const)
3675 {
3676 return bound_member<
3677 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K>(obj,fptr);
3678 }
3679
3680 template <typename RT, typename ClassT,
3681 typename A, typename B, typename C, typename D,
3682 typename E, typename F, typename G, typename H, typename I,
3683 typename J, typename K
3684 >
3685 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K>
3686 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K) const)
3687 {
3688 return bound_member<
3689 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K>(obj,fptr);
3690 }
3691
3692 #if PHOENIX_LIMIT > 12
3693
3694
3695
3696
3697
3698 template <typename RT, typename ClassT,
3699 typename A, typename B, typename C, typename D,
3700 typename E, typename F, typename G, typename H, typename I,
3701 typename J, typename K, typename L
3702 >
3703 struct bound_member_action<RT, ClassT,
3704 A, B, C, D, E, F, G, H, I, J, K, L, nil_t, nil_t, nil_t, nil_t> {
3705
3706 typedef RT result_type;
3707 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L);
3708 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L) const;
3709 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
3710 mem_func_ptr_t;
3711
3712 template <
3713 typename A_, typename B_, typename C_, typename D_,
3714 typename E_, typename F_, typename G_, typename H_, typename I_,
3715 typename J_, typename K_, typename L_
3716 >
3717 struct result { typedef result_type type; };
3718
3719 template <typename CT>
3720 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
3721 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
3722
3723 result_type operator()(
3724 A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l
3725 ) const
3726 {
3727 return (obj->*fptr)(a, b, c, d, e, f, g, h, i, j, k, l);
3728 }
3729
3730 typename impl::as_ptr<ClassT>::pointer_type obj;
3731 mem_func_ptr_t fptr;
3732 };
3733
3734
3735 template <typename RT, typename ClassT,
3736 typename A, typename B, typename C, typename D,
3737 typename E, typename F, typename G, typename H, typename I,
3738 typename J, typename K, typename L
3739 >
3740 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L>
3741 bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L))
3742 {
3743 return bound_member<
3744 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L>(obj,fptr);
3745 }
3746
3747 template <typename RT, typename ClassT,
3748 typename A, typename B, typename C, typename D,
3749 typename E, typename F, typename G, typename H, typename I,
3750 typename J, typename K, typename L
3751 >
3752 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L>
3753 bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L))
3754 {
3755 return bound_member<
3756 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L>(obj,fptr);
3757 }
3758
3759 template <typename RT, typename ClassT,
3760 typename A, typename B, typename C, typename D,
3761 typename E, typename F, typename G, typename H, typename I,
3762 typename J, typename K, typename L
3763 >
3764 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L>
3765 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L) const)
3766 {
3767 return bound_member<
3768 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L>(obj,fptr);
3769 }
3770
3771 template <typename RT, typename ClassT,
3772 typename A, typename B, typename C, typename D,
3773 typename E, typename F, typename G, typename H, typename I,
3774 typename J, typename K, typename L
3775 >
3776 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L>
3777 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L) const)
3778 {
3779 return bound_member<
3780 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L>(obj,fptr);
3781 }
3782
3783
3784
3785
3786
3787
3788 template <typename RT, typename ClassT,
3789 typename A, typename B, typename C, typename D,
3790 typename E, typename F, typename G, typename H, typename I,
3791 typename J, typename K, typename L, typename M
3792 >
3793 struct bound_member_action<RT, ClassT,
3794 A, B, C, D, E, F, G, H, I, J, K, L, M, nil_t, nil_t, nil_t> {
3795
3796 typedef RT result_type;
3797 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L, M);
3798 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L, M) const;
3799 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
3800 mem_func_ptr_t;
3801
3802 template <
3803 typename A_, typename B_, typename C_, typename D_,
3804 typename E_, typename F_, typename G_, typename H_, typename I_,
3805 typename J_, typename K_, typename L_, typename M_
3806 >
3807 struct result { typedef result_type type; };
3808
3809 template <typename CT>
3810 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
3811 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
3812
3813 result_type operator()(
3814 A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m
3815 ) const
3816 {
3817 return (obj->*fptr)(a, b, c, d, e, f, g, h, i, j, k, l, m);
3818 }
3819
3820 typename impl::as_ptr<ClassT>::pointer_type obj;
3821 mem_func_ptr_t fptr;
3822 };
3823
3824
3825 template <typename RT, typename ClassT,
3826 typename A, typename B, typename C, typename D,
3827 typename E, typename F, typename G, typename H, typename I,
3828 typename J, typename K, typename L, typename M
3829 >
3830 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M>
3831 bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M))
3832 {
3833 return bound_member<
3834 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M>(obj,fptr);
3835 }
3836
3837 template <typename RT, typename ClassT,
3838 typename A, typename B, typename C, typename D,
3839 typename E, typename F, typename G, typename H, typename I,
3840 typename J, typename K, typename L, typename M
3841 >
3842 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M>
3843 bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M))
3844 {
3845 return bound_member<
3846 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M>(obj,fptr);
3847 }
3848
3849 template <typename RT, typename ClassT,
3850 typename A, typename B, typename C, typename D,
3851 typename E, typename F, typename G, typename H, typename I,
3852 typename J, typename K, typename L, typename M
3853 >
3854 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M>
3855 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M) const)
3856 {
3857 return bound_member<
3858 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M>(obj,fptr);
3859 }
3860
3861 template <typename RT, typename ClassT,
3862 typename A, typename B, typename C, typename D,
3863 typename E, typename F, typename G, typename H, typename I,
3864 typename J, typename K, typename L, typename M
3865 >
3866 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M>
3867 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M) const)
3868 {
3869 return bound_member<
3870 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M>(obj,fptr);
3871 }
3872
3873
3874
3875
3876
3877
3878 template <typename RT, typename ClassT,
3879 typename A, typename B, typename C, typename D,
3880 typename E, typename F, typename G, typename H, typename I,
3881 typename J, typename K, typename L, typename M, typename N
3882 >
3883 struct bound_member_action<RT, ClassT,
3884 A, B, C, D, E, F, G, H, I, J, K, L, M, N, nil_t, nil_t> {
3885
3886 typedef RT result_type;
3887 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N);
3888 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N) const;
3889 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
3890 mem_func_ptr_t;
3891
3892 template <
3893 typename A_, typename B_, typename C_, typename D_,
3894 typename E_, typename F_, typename G_, typename H_, typename I_,
3895 typename J_, typename K_, typename L_, typename M_, typename N_
3896 >
3897 struct result { typedef result_type type; };
3898
3899 template <typename CT>
3900 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
3901 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
3902
3903 result_type operator()(
3904 A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n
3905 ) const
3906 {
3907 return (obj->*fptr)(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
3908 }
3909
3910 typename impl::as_ptr<ClassT>::pointer_type obj;
3911 mem_func_ptr_t fptr;
3912 };
3913
3914
3915 template <typename RT, typename ClassT,
3916 typename A, typename B, typename C, typename D,
3917 typename E, typename F, typename G, typename H, typename I,
3918 typename J, typename K, typename L, typename M, typename N
3919 >
3920 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
3921 bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N))
3922 {
3923 return bound_member<
3924 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(obj,fptr);
3925 }
3926
3927 template <typename RT, typename ClassT,
3928 typename A, typename B, typename C, typename D,
3929 typename E, typename F, typename G, typename H, typename I,
3930 typename J, typename K, typename L, typename M, typename N
3931 >
3932 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
3933 bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N))
3934 {
3935 return bound_member<
3936 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(obj,fptr);
3937 }
3938
3939 template <typename RT, typename ClassT,
3940 typename A, typename B, typename C, typename D,
3941 typename E, typename F, typename G, typename H, typename I,
3942 typename J, typename K, typename L, typename M, typename N
3943 >
3944 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
3945 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N) const)
3946 {
3947 return bound_member<
3948 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(obj,fptr);
3949 }
3950
3951 template <typename RT, typename ClassT,
3952 typename A, typename B, typename C, typename D,
3953 typename E, typename F, typename G, typename H, typename I,
3954 typename J, typename K, typename L, typename M, typename N
3955 >
3956 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
3957 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N) const)
3958 {
3959 return bound_member<
3960 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(obj,fptr);
3961 }
3962
3963
3964
3965
3966
3967
3968 template <typename RT, typename ClassT,
3969 typename A, typename B, typename C, typename D,
3970 typename E, typename F, typename G, typename H, typename I,
3971 typename J, typename K, typename L, typename M, typename N,
3972 typename O
3973 >
3974 struct bound_member_action<RT, ClassT,
3975 A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, nil_t> {
3976
3977 typedef RT result_type;
3978 typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O);
3979 typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) const;
3980 typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
3981 mem_func_ptr_t;
3982
3983 template <
3984 typename A_, typename B_, typename C_, typename D_,
3985 typename E_, typename F_, typename G_, typename H_, typename I_,
3986 typename J_, typename K_, typename L_, typename M_, typename N_,
3987 typename O_
3988 >
3989 struct result { typedef result_type type; };
3990
3991 template <typename CT>
3992 bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
3993 : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
3994
3995 result_type operator()(
3996 A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o
3997 ) const
3998 {
3999 return (obj->*fptr)(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
4000 }
4001
4002 typename impl::as_ptr<ClassT>::pointer_type obj;
4003 mem_func_ptr_t fptr;
4004 };
4005
4006
4007 template <typename RT, typename ClassT,
4008 typename A, typename B, typename C, typename D,
4009 typename E, typename F, typename G, typename H, typename I,
4010 typename J, typename K, typename L, typename M, typename N,
4011 typename O
4012 >
4013 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
4014 bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O))
4015 {
4016 return bound_member<
4017 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(obj,fptr);
4018 }
4019
4020 template <typename RT, typename ClassT,
4021 typename A, typename B, typename C, typename D,
4022 typename E, typename F, typename G, typename H, typename I,
4023 typename J, typename K, typename L, typename M, typename N,
4024 typename O
4025 >
4026 inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
4027 bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O))
4028 {
4029 return bound_member<
4030 RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(obj,fptr);
4031 }
4032
4033 template <typename RT, typename ClassT,
4034 typename A, typename B, typename C, typename D,
4035 typename E, typename F, typename G, typename H, typename I,
4036 typename J, typename K, typename L, typename M, typename N,
4037 typename O
4038 >
4039 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
4040 bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) const)
4041 {
4042 return bound_member<
4043 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(obj,fptr);
4044 }
4045
4046 template <typename RT, typename ClassT,
4047 typename A, typename B, typename C, typename D,
4048 typename E, typename F, typename G, typename H, typename I,
4049 typename J, typename K, typename L, typename M, typename N,
4050 typename O
4051 >
4052 inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
4053 bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) const)
4054 {
4055 return bound_member<
4056 RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(obj,fptr);
4057 }
4058
4059 #endif
4060 #endif
4061 #endif
4062 #endif
4063
4064 }
4065
4066 #endif