Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 1 | // |
| 2 | // bind/bind_cc.hpp - support for different calling conventions |
| 3 | // |
| 4 | // Do not include this header directly. |
| 5 | // |
| 6 | // Copyright (c) 2001 Peter Dimov and Multi Media Ltd. |
| 7 | // |
| 8 | // Distributed under the Boost Software License, Version 1.0. (See |
| 9 | // accompanying file LICENSE_1_0.txt or copy at |
| 10 | // http://www.boost.org/LICENSE_1_0.txt) |
| 11 | // |
| 12 | // See http://www.boost.org/libs/bind/bind.html for documentation. |
| 13 | // |
| 14 | |
| 15 | template<class R> |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 16 | _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (), _bi::list0> |
| 17 | NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) ()) |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 18 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 19 | typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (); |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 20 | typedef _bi::list0 list_type; |
| 21 | return _bi::bind_t<R, F, list_type> (f, list_type()); |
| 22 | } |
| 23 | |
| 24 | template<class R, class B1, class A1> |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 25 | _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1), typename _bi::list_av_1<A1>::type> |
| 26 | NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1), A1 a1) |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 27 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 28 | typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1); |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 29 | typedef typename _bi::list_av_1<A1>::type list_type; |
| 30 | return _bi::bind_t<R, F, list_type> (f, list_type(a1)); |
| 31 | } |
| 32 | |
| 33 | template<class R, class B1, class B2, class A1, class A2> |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 34 | _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2), typename _bi::list_av_2<A1, A2>::type> |
| 35 | NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2), A1 a1, A2 a2) |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 36 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 37 | typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2); |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 38 | typedef typename _bi::list_av_2<A1, A2>::type list_type; |
| 39 | return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2)); |
| 40 | } |
| 41 | |
| 42 | template<class R, |
| 43 | class B1, class B2, class B3, |
| 44 | class A1, class A2, class A3> |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 45 | _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3), typename _bi::list_av_3<A1, A2, A3>::type> |
| 46 | NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3) |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 47 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 48 | typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3); |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 49 | typedef typename _bi::list_av_3<A1, A2, A3>::type list_type; |
| 50 | return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3)); |
| 51 | } |
| 52 | |
| 53 | template<class R, |
| 54 | class B1, class B2, class B3, class B4, |
| 55 | class A1, class A2, class A3, class A4> |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 56 | _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3, B4), typename _bi::list_av_4<A1, A2, A3, A4>::type> |
| 57 | NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4) |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 58 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 59 | typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3, B4); |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 60 | typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type; |
| 61 | return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4)); |
| 62 | } |
| 63 | |
| 64 | template<class R, |
| 65 | class B1, class B2, class B3, class B4, class B5, |
| 66 | class A1, class A2, class A3, class A4, class A5> |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 67 | _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3, B4, B5), typename _bi::list_av_5<A1, A2, A3, A4, A5>::type> |
| 68 | NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 69 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 70 | typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3, B4, B5); |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 71 | typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type; |
| 72 | return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); |
| 73 | } |
| 74 | |
| 75 | template<class R, |
| 76 | class B1, class B2, class B3, class B4, class B5, class B6, |
| 77 | class A1, class A2, class A3, class A4, class A5, class A6> |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 78 | _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6), typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type> |
| 79 | NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 80 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 81 | typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6); |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 82 | typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type; |
| 83 | return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); |
| 84 | } |
| 85 | |
| 86 | template<class R, |
| 87 | class B1, class B2, class B3, class B4, class B5, class B6, class B7, |
| 88 | class A1, class A2, class A3, class A4, class A5, class A6, class A7> |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 89 | _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7), typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type> |
| 90 | NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 91 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 92 | typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7); |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 93 | typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type; |
| 94 | return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); |
| 95 | } |
| 96 | |
| 97 | template<class R, |
| 98 | class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8, |
| 99 | class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 100 | _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8), typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type> |
| 101 | NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 102 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 103 | typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8); |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 104 | typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type; |
| 105 | return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); |
| 106 | } |
| 107 | |
| 108 | template<class R, |
| 109 | class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8, class B9, |
| 110 | class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 111 | _bi::bind_t<R, NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8, B9), typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type> |
| 112 | NDNBOOST_BIND(NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 113 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 114 | typedef NDNBOOST_BIND_ST R (NDNBOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9); |
Jeff Thompson | ef2d5a4 | 2013-08-22 19:09:24 -0700 | [diff] [blame] | 115 | typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type; |
| 116 | return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); |
| 117 | } |