blob: 34108e7030b32d94ce04a7f9f6262d00d558df88 [file] [log] [blame]
Jeff Thompsonef2d5a42013-08-22 19:09:24 -07001//
2// bind/bind_mf_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// 0
16
17template<class R, class T,
18 class A1>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070019 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
20 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (), A1 a1)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070021{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070022 typedef _mfi::NDNBOOST_BIND_MF_NAME(mf0)<R, T> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070023 typedef typename _bi::list_av_1<A1>::type list_type;
24 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1));
25}
26
27template<class R, class T,
28 class A1>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070029 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
30 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) () const, A1 a1)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070031{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070032 typedef _mfi::NDNBOOST_BIND_MF_NAME(cmf0)<R, T> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070033 typedef typename _bi::list_av_1<A1>::type list_type;
34 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1));
35}
36
37// 1
38
39template<class R, class T,
40 class B1,
41 class A1, class A2>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070042 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
43 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070044{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070045 typedef _mfi::NDNBOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070046 typedef typename _bi::list_av_2<A1, A2>::type list_type;
47 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2));
48}
49
50template<class R, class T,
51 class B1,
52 class A1, class A2>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070053 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
54 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070055{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070056 typedef _mfi::NDNBOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070057 typedef typename _bi::list_av_2<A1, A2>::type list_type;
58 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2));
59}
60
61// 2
62
63template<class R, class T,
64 class B1, class B2,
65 class A1, class A2, class A3>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070066 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
67 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070068{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070069 typedef _mfi::NDNBOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070070 typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
71 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3));
72}
73
74template<class R, class T,
75 class B1, class B2,
76 class A1, class A2, class A3>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070077 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
78 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070079{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070080 typedef _mfi::NDNBOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070081 typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
82 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3));
83}
84
85// 3
86
87template<class R, class T,
88 class B1, class B2, class B3,
89 class A1, class A2, class A3, class A4>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070090 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
91 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070092{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070093 typedef _mfi::NDNBOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070094 typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
95 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4));
96}
97
98template<class R, class T,
99 class B1, class B2, class B3,
100 class A1, class A2, class A3, class A4>
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700101 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
102 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700103{
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700104 typedef _mfi::NDNBOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700105 typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
106 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4));
107}
108
109// 4
110
111template<class R, class T,
112 class B1, class B2, class B3, class B4,
113 class A1, class A2, class A3, class A4, class A5>
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700114 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
115 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700116{
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700117 typedef _mfi::NDNBOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700118 typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
119 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
120}
121
122template<class R, class T,
123 class B1, class B2, class B3, class B4,
124 class A1, class A2, class A3, class A4, class A5>
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700125 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
126 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700127{
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700128 typedef _mfi::NDNBOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700129 typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
130 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
131}
132
133// 5
134
135template<class R, class T,
136 class B1, class B2, class B3, class B4, class B5,
137 class A1, class A2, class A3, class A4, class A5, class A6>
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700138 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
139 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700140{
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700141 typedef _mfi::NDNBOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700142 typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
143 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
144}
145
146template<class R, class T,
147 class B1, class B2, class B3, class B4, class B5,
148 class A1, class A2, class A3, class A4, class A5, class A6>
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700149 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
150 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700151{
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700152 typedef _mfi::NDNBOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700153 typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
154 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
155}
156
157// 6
158
159template<class R, class T,
160 class B1, class B2, class B3, class B4, class B5, class B6,
161 class A1, class A2, class A3, class A4, class A5, class A6, class A7>
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700162 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
163 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700164{
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700165 typedef _mfi::NDNBOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700166 typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
167 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
168}
169
170template<class R, class T,
171 class B1, class B2, class B3, class B4, class B5, class B6,
172 class A1, class A2, class A3, class A4, class A5, class A6, class A7>
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700173 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
174 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700175{
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700176 typedef _mfi::NDNBOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700177 typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
178 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
179}
180
181// 7
182
183template<class R, class T,
184 class B1, class B2, class B3, class B4, class B5, class B6, class B7,
185 class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700186 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
187 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700188{
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700189 typedef _mfi::NDNBOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700190 typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
191 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
192}
193
194template<class R, class T,
195 class B1, class B2, class B3, class B4, class B5, class B6, class B7,
196 class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700197 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
198 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700199{
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700200 typedef _mfi::NDNBOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700201 typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
202 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
203}
204
205// 8
206
207template<class R, class T,
208 class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
209 class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700210 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
211 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*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, A9 a9)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700212{
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700213 typedef _mfi::NDNBOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700214 typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
215 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
216}
217
218template<class R, class T,
219 class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
220 class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700221 _bi::bind_t<R, _mfi::NDNBOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
222 NDNBOOST_BIND(R (NDNBOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700223{
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700224 typedef _mfi::NDNBOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -0700225 typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
226 return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
227}