blob: 3ea24e7c6b2a421d546cd4b823ec45ee4435173d [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001//
2// bind/mem_fn_template.hpp
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/mem_fn.html for documentation.
13//
14
Jeff Thompson3d613fd2013-10-15 15:39:04 -070015#if !defined(NDNBOOST_NO_FUNCTION_TEMPLATE_ORDERING)
16# define NDNBOOST_MEM_FN_ENABLE_CONST_OVERLOADS
Jeff Thompsona28eed82013-08-22 16:21:10 -070017#endif
18
19// mf0
20
Jeff Thompson3d613fd2013-10-15 15:39:04 -070021template<class R, class T NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(mf0)
Jeff Thompsona28eed82013-08-22 16:21:10 -070022{
23public:
24
25 typedef R result_type;
26 typedef T * argument_type;
27
28private:
29
Jeff Thompson3d613fd2013-10-15 15:39:04 -070030 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) ())
Jeff Thompsona28eed82013-08-22 16:21:10 -070031 F f_;
32
33 template<class U> R call(U & u, T const *) const
34 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -070035 NDNBOOST_MEM_FN_RETURN (u.*f_)();
Jeff Thompsona28eed82013-08-22 16:21:10 -070036 }
37
38 template<class U> R call(U & u, void const *) const
39 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -070040 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)();
Jeff Thompsona28eed82013-08-22 16:21:10 -070041 }
42
43public:
44
Jeff Thompson3d613fd2013-10-15 15:39:04 -070045 explicit NDNBOOST_MEM_FN_NAME(mf0)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -070046
47 R operator()(T * p) const
48 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -070049 NDNBOOST_MEM_FN_RETURN (p->*f_)();
Jeff Thompsona28eed82013-08-22 16:21:10 -070050 }
51
52 template<class U> R operator()(U & u) const
53 {
54 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -070055 NDNBOOST_MEM_FN_RETURN call(u, p);
Jeff Thompsona28eed82013-08-22 16:21:10 -070056 }
57
Jeff Thompson3d613fd2013-10-15 15:39:04 -070058#ifdef NDNBOOST_MEM_FN_ENABLE_CONST_OVERLOADS
Jeff Thompsona28eed82013-08-22 16:21:10 -070059
60 template<class U> R operator()(U const & u) const
61 {
62 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -070063 NDNBOOST_MEM_FN_RETURN call(u, p);
Jeff Thompsona28eed82013-08-22 16:21:10 -070064 }
65
66#endif
67
68 R operator()(T & t) const
69 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -070070 NDNBOOST_MEM_FN_RETURN (t.*f_)();
Jeff Thompsona28eed82013-08-22 16:21:10 -070071 }
72
Jeff Thompson3d613fd2013-10-15 15:39:04 -070073 bool operator==(NDNBOOST_MEM_FN_NAME(mf0) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -070074 {
75 return f_ == rhs.f_;
76 }
77
Jeff Thompson3d613fd2013-10-15 15:39:04 -070078 bool operator!=(NDNBOOST_MEM_FN_NAME(mf0) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -070079 {
80 return f_ != rhs.f_;
81 }
82};
83
84// cmf0
85
Jeff Thompson3d613fd2013-10-15 15:39:04 -070086template<class R, class T NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(cmf0)
Jeff Thompsona28eed82013-08-22 16:21:10 -070087{
88public:
89
90 typedef R result_type;
91 typedef T const * argument_type;
92
93private:
94
Jeff Thompson3d613fd2013-10-15 15:39:04 -070095 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) () const)
Jeff Thompsona28eed82013-08-22 16:21:10 -070096 F f_;
97
98 template<class U> R call(U & u, T const *) const
99 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700100 NDNBOOST_MEM_FN_RETURN (u.*f_)();
Jeff Thompsona28eed82013-08-22 16:21:10 -0700101 }
102
103 template<class U> R call(U & u, void const *) const
104 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700105 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)();
Jeff Thompsona28eed82013-08-22 16:21:10 -0700106 }
107
108public:
109
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700110 explicit NDNBOOST_MEM_FN_NAME(cmf0)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700111
112 template<class U> R operator()(U const & u) const
113 {
114 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700115 NDNBOOST_MEM_FN_RETURN call(u, p);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700116 }
117
118 R operator()(T const & t) const
119 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700120 NDNBOOST_MEM_FN_RETURN (t.*f_)();
Jeff Thompsona28eed82013-08-22 16:21:10 -0700121 }
122
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700123 bool operator==(NDNBOOST_MEM_FN_NAME(cmf0) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700124 {
125 return f_ == rhs.f_;
126 }
127
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700128 bool operator!=(NDNBOOST_MEM_FN_NAME(cmf0) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700129 {
130 return f_ != rhs.f_;
131 }
132};
133
134// mf1
135
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700136template<class R, class T, class A1 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(mf1)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700137{
138public:
139
140 typedef R result_type;
141 typedef T * first_argument_type;
142 typedef A1 second_argument_type;
143
144private:
145
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700146 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1))
Jeff Thompsona28eed82013-08-22 16:21:10 -0700147 F f_;
148
149 template<class U, class B1> R call(U & u, T const *, B1 & b1) const
150 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700151 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700152 }
153
154 template<class U, class B1> R call(U & u, void const *, B1 & b1) const
155 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700156 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700157 }
158
159public:
160
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700161 explicit NDNBOOST_MEM_FN_NAME(mf1)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700162
163 R operator()(T * p, A1 a1) const
164 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700165 NDNBOOST_MEM_FN_RETURN (p->*f_)(a1);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700166 }
167
168 template<class U> R operator()(U & u, A1 a1) const
169 {
170 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700171 NDNBOOST_MEM_FN_RETURN call(u, p, a1);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700172 }
173
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700174#ifdef NDNBOOST_MEM_FN_ENABLE_CONST_OVERLOADS
Jeff Thompsona28eed82013-08-22 16:21:10 -0700175
176 template<class U> R operator()(U const & u, A1 a1) const
177 {
178 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700179 NDNBOOST_MEM_FN_RETURN call(u, p, a1);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700180 }
181
182#endif
183
184 R operator()(T & t, A1 a1) const
185 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700186 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700187 }
188
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700189 bool operator==(NDNBOOST_MEM_FN_NAME(mf1) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700190 {
191 return f_ == rhs.f_;
192 }
193
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700194 bool operator!=(NDNBOOST_MEM_FN_NAME(mf1) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700195 {
196 return f_ != rhs.f_;
197 }
198};
199
200// cmf1
201
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700202template<class R, class T, class A1 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(cmf1)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700203{
204public:
205
206 typedef R result_type;
207 typedef T const * first_argument_type;
208 typedef A1 second_argument_type;
209
210private:
211
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700212 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1) const)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700213 F f_;
214
215 template<class U, class B1> R call(U & u, T const *, B1 & b1) const
216 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700217 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700218 }
219
220 template<class U, class B1> R call(U & u, void const *, B1 & b1) const
221 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700222 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700223 }
224
225public:
226
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700227 explicit NDNBOOST_MEM_FN_NAME(cmf1)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700228
229 template<class U> R operator()(U const & u, A1 a1) const
230 {
231 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700232 NDNBOOST_MEM_FN_RETURN call(u, p, a1);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700233 }
234
235 R operator()(T const & t, A1 a1) const
236 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700237 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700238 }
239
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700240 bool operator==(NDNBOOST_MEM_FN_NAME(cmf1) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700241 {
242 return f_ == rhs.f_;
243 }
244
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700245 bool operator!=(NDNBOOST_MEM_FN_NAME(cmf1) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700246 {
247 return f_ != rhs.f_;
248 }
249};
250
251// mf2
252
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700253template<class R, class T, class A1, class A2 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(mf2)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700254{
255public:
256
257 typedef R result_type;
258
259private:
260
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700261 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2))
Jeff Thompsona28eed82013-08-22 16:21:10 -0700262 F f_;
263
264 template<class U, class B1, class B2> R call(U & u, T const *, B1 & b1, B2 & b2) const
265 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700266 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700267 }
268
269 template<class U, class B1, class B2> R call(U & u, void const *, B1 & b1, B2 & b2) const
270 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700271 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700272 }
273
274public:
275
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700276 explicit NDNBOOST_MEM_FN_NAME(mf2)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700277
278 R operator()(T * p, A1 a1, A2 a2) const
279 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700280 NDNBOOST_MEM_FN_RETURN (p->*f_)(a1, a2);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700281 }
282
283 template<class U> R operator()(U & u, A1 a1, A2 a2) const
284 {
285 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700286 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700287 }
288
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700289#ifdef NDNBOOST_MEM_FN_ENABLE_CONST_OVERLOADS
Jeff Thompsona28eed82013-08-22 16:21:10 -0700290
291 template<class U> R operator()(U const & u, A1 a1, A2 a2) const
292 {
293 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700294 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700295 }
296
297#endif
298
299 R operator()(T & t, A1 a1, A2 a2) const
300 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700301 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700302 }
303
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700304 bool operator==(NDNBOOST_MEM_FN_NAME(mf2) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700305 {
306 return f_ == rhs.f_;
307 }
308
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700309 bool operator!=(NDNBOOST_MEM_FN_NAME(mf2) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700310 {
311 return f_ != rhs.f_;
312 }
313};
314
315// cmf2
316
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700317template<class R, class T, class A1, class A2 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(cmf2)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700318{
319public:
320
321 typedef R result_type;
322
323private:
324
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700325 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2) const)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700326 F f_;
327
328 template<class U, class B1, class B2> R call(U & u, T const *, B1 & b1, B2 & b2) const
329 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700330 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700331 }
332
333 template<class U, class B1, class B2> R call(U & u, void const *, B1 & b1, B2 & b2) const
334 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700335 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700336 }
337
338public:
339
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700340 explicit NDNBOOST_MEM_FN_NAME(cmf2)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700341
342 template<class U> R operator()(U const & u, A1 a1, A2 a2) const
343 {
344 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700345 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700346 }
347
348 R operator()(T const & t, A1 a1, A2 a2) const
349 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700350 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700351 }
352
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700353 bool operator==(NDNBOOST_MEM_FN_NAME(cmf2) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700354 {
355 return f_ == rhs.f_;
356 }
357
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700358 bool operator!=(NDNBOOST_MEM_FN_NAME(cmf2) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700359 {
360 return f_ != rhs.f_;
361 }
362};
363
364// mf3
365
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700366template<class R, class T, class A1, class A2, class A3 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(mf3)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700367{
368public:
369
370 typedef R result_type;
371
372private:
373
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700374 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2, A3))
Jeff Thompsona28eed82013-08-22 16:21:10 -0700375 F f_;
376
377 template<class U, class B1, class B2, class B3> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const
378 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700379 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700380 }
381
382 template<class U, class B1, class B2, class B3> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const
383 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700384 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700385 }
386
387public:
388
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700389 explicit NDNBOOST_MEM_FN_NAME(mf3)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700390
391 R operator()(T * p, A1 a1, A2 a2, A3 a3) const
392 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700393 NDNBOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700394 }
395
396 template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3) const
397 {
398 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700399 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700400 }
401
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700402#ifdef NDNBOOST_MEM_FN_ENABLE_CONST_OVERLOADS
Jeff Thompsona28eed82013-08-22 16:21:10 -0700403
404 template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3) const
405 {
406 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700407 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700408 }
409
410#endif
411
412 R operator()(T & t, A1 a1, A2 a2, A3 a3) const
413 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700414 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700415 }
416
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700417 bool operator==(NDNBOOST_MEM_FN_NAME(mf3) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700418 {
419 return f_ == rhs.f_;
420 }
421
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700422 bool operator!=(NDNBOOST_MEM_FN_NAME(mf3) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700423 {
424 return f_ != rhs.f_;
425 }
426};
427
428// cmf3
429
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700430template<class R, class T, class A1, class A2, class A3 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(cmf3)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700431{
432public:
433
434 typedef R result_type;
435
436private:
437
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700438 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2, A3) const)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700439 F f_;
440
441 template<class U, class B1, class B2, class B3> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const
442 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700443 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700444 }
445
446 template<class U, class B1, class B2, class B3> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const
447 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700448 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700449 }
450
451public:
452
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700453 explicit NDNBOOST_MEM_FN_NAME(cmf3)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700454
455 template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3) const
456 {
457 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700458 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700459 }
460
461 R operator()(T const & t, A1 a1, A2 a2, A3 a3) const
462 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700463 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700464 }
465
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700466 bool operator==(NDNBOOST_MEM_FN_NAME(cmf3) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700467 {
468 return f_ == rhs.f_;
469 }
470
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700471 bool operator!=(NDNBOOST_MEM_FN_NAME(cmf3) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700472 {
473 return f_ != rhs.f_;
474 }
475};
476
477// mf4
478
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700479template<class R, class T, class A1, class A2, class A3, class A4 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(mf4)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700480{
481public:
482
483 typedef R result_type;
484
485private:
486
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700487 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4))
Jeff Thompsona28eed82013-08-22 16:21:10 -0700488 F f_;
489
490 template<class U, class B1, class B2, class B3, class B4> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const
491 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700492 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700493 }
494
495 template<class U, class B1, class B2, class B3, class B4> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const
496 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700497 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700498 }
499
500public:
501
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700502 explicit NDNBOOST_MEM_FN_NAME(mf4)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700503
504 R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4) const
505 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700506 NDNBOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700507 }
508
509 template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4) const
510 {
511 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700512 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700513 }
514
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700515#ifdef NDNBOOST_MEM_FN_ENABLE_CONST_OVERLOADS
Jeff Thompsona28eed82013-08-22 16:21:10 -0700516
517 template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const
518 {
519 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700520 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700521 }
522
523#endif
524
525 R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4) const
526 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700527 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700528 }
529
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700530 bool operator==(NDNBOOST_MEM_FN_NAME(mf4) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700531 {
532 return f_ == rhs.f_;
533 }
534
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700535 bool operator!=(NDNBOOST_MEM_FN_NAME(mf4) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700536 {
537 return f_ != rhs.f_;
538 }
539};
540
541// cmf4
542
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700543template<class R, class T, class A1, class A2, class A3, class A4 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(cmf4)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700544{
545public:
546
547 typedef R result_type;
548
549private:
550
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700551 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700552 F f_;
553
554 template<class U, class B1, class B2, class B3, class B4> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const
555 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700556 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700557 }
558
559 template<class U, class B1, class B2, class B3, class B4> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const
560 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700561 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700562 }
563
564public:
565
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700566 explicit NDNBOOST_MEM_FN_NAME(cmf4)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700567
568 template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const
569 {
570 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700571 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700572 }
573
574 R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4) const
575 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700576 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700577 }
578
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700579 bool operator==(NDNBOOST_MEM_FN_NAME(cmf4) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700580 {
581 return f_ == rhs.f_;
582 }
583
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700584 bool operator!=(NDNBOOST_MEM_FN_NAME(cmf4) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700585 {
586 return f_ != rhs.f_;
587 }
588};
589
590// mf5
591
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700592template<class R, class T, class A1, class A2, class A3, class A4, class A5 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(mf5)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700593{
594public:
595
596 typedef R result_type;
597
598private:
599
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700600 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5))
Jeff Thompsona28eed82013-08-22 16:21:10 -0700601 F f_;
602
603 template<class U, class B1, class B2, class B3, class B4, class B5> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const
604 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700605 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700606 }
607
608 template<class U, class B1, class B2, class B3, class B4, class B5> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const
609 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700610 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700611 }
612
613public:
614
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700615 explicit NDNBOOST_MEM_FN_NAME(mf5)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700616
617 R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
618 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700619 NDNBOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700620 }
621
622 template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
623 {
624 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700625 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700626 }
627
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700628#ifdef NDNBOOST_MEM_FN_ENABLE_CONST_OVERLOADS
Jeff Thompsona28eed82013-08-22 16:21:10 -0700629
630 template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
631 {
632 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700633 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700634 }
635
636#endif
637
638 R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
639 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700640 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700641 }
642
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700643 bool operator==(NDNBOOST_MEM_FN_NAME(mf5) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700644 {
645 return f_ == rhs.f_;
646 }
647
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700648 bool operator!=(NDNBOOST_MEM_FN_NAME(mf5) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700649 {
650 return f_ != rhs.f_;
651 }
652};
653
654// cmf5
655
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700656template<class R, class T, class A1, class A2, class A3, class A4, class A5 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(cmf5)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700657{
658public:
659
660 typedef R result_type;
661
662private:
663
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700664 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700665 F f_;
666
667 template<class U, class B1, class B2, class B3, class B4, class B5> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const
668 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700669 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700670 }
671
672 template<class U, class B1, class B2, class B3, class B4, class B5> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const
673 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700674 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700675 }
676
677public:
678
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700679 explicit NDNBOOST_MEM_FN_NAME(cmf5)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700680
681 template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
682 {
683 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700684 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700685 }
686
687 R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
688 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700689 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700690 }
691
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700692 bool operator==(NDNBOOST_MEM_FN_NAME(cmf5) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700693 {
694 return f_ == rhs.f_;
695 }
696
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700697 bool operator!=(NDNBOOST_MEM_FN_NAME(cmf5) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700698 {
699 return f_ != rhs.f_;
700 }
701};
702
703// mf6
704
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700705template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(mf6)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700706{
707public:
708
709 typedef R result_type;
710
711private:
712
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700713 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6))
Jeff Thompsona28eed82013-08-22 16:21:10 -0700714 F f_;
715
716 template<class U, class B1, class B2, class B3, class B4, class B5, class B6> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const
717 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700718 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700719 }
720
721 template<class U, class B1, class B2, class B3, class B4, class B5, class B6> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const
722 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700723 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700724 }
725
726public:
727
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700728 explicit NDNBOOST_MEM_FN_NAME(mf6)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700729
730 R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
731 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700732 NDNBOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700733 }
734
735 template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
736 {
737 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700738 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700739 }
740
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700741#ifdef NDNBOOST_MEM_FN_ENABLE_CONST_OVERLOADS
Jeff Thompsona28eed82013-08-22 16:21:10 -0700742
743 template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
744 {
745 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700746 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700747 }
748
749#endif
750
751 R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
752 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700753 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700754 }
755
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700756 bool operator==(NDNBOOST_MEM_FN_NAME(mf6) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700757 {
758 return f_ == rhs.f_;
759 }
760
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700761 bool operator!=(NDNBOOST_MEM_FN_NAME(mf6) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700762 {
763 return f_ != rhs.f_;
764 }
765};
766
767// cmf6
768
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700769template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(cmf6)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700770{
771public:
772
773 typedef R result_type;
774
775private:
776
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700777 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700778 F f_;
779
780 template<class U, class B1, class B2, class B3, class B4, class B5, class B6> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const
781 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700782 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700783 }
784
785 template<class U, class B1, class B2, class B3, class B4, class B5, class B6> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const
786 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700787 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700788 }
789
790public:
791
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700792 explicit NDNBOOST_MEM_FN_NAME(cmf6)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700793
794 template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
795 {
796 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700797 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700798 }
799
800 R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
801 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700802 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700803 }
804
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700805 bool operator==(NDNBOOST_MEM_FN_NAME(cmf6) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700806 {
807 return f_ == rhs.f_;
808 }
809
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700810 bool operator!=(NDNBOOST_MEM_FN_NAME(cmf6) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700811 {
812 return f_ != rhs.f_;
813 }
814};
815
816// mf7
817
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700818template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(mf7)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700819{
820public:
821
822 typedef R result_type;
823
824private:
825
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700826 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7))
Jeff Thompsona28eed82013-08-22 16:21:10 -0700827 F f_;
828
829 template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const
830 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700831 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700832 }
833
834 template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const
835 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700836 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700837 }
838
839public:
840
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700841 explicit NDNBOOST_MEM_FN_NAME(mf7)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700842
843 R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
844 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700845 NDNBOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700846 }
847
848 template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
849 {
850 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700851 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700852 }
853
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700854#ifdef NDNBOOST_MEM_FN_ENABLE_CONST_OVERLOADS
Jeff Thompsona28eed82013-08-22 16:21:10 -0700855
856 template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
857 {
858 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700859 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700860 }
861
862#endif
863
864 R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
865 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700866 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700867 }
868
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700869 bool operator==(NDNBOOST_MEM_FN_NAME(mf7) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700870 {
871 return f_ == rhs.f_;
872 }
873
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700874 bool operator!=(NDNBOOST_MEM_FN_NAME(mf7) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700875 {
876 return f_ != rhs.f_;
877 }
878};
879
880// cmf7
881
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700882template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(cmf7)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700883{
884public:
885
886 typedef R result_type;
887
888private:
889
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700890 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700891 F f_;
892
893 template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const
894 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700895 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700896 }
897
898 template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const
899 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700900 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700901 }
902
903public:
904
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700905 explicit NDNBOOST_MEM_FN_NAME(cmf7)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700906
907 template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
908 {
909 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700910 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700911 }
912
913 R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
914 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700915 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700916 }
917
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700918 bool operator==(NDNBOOST_MEM_FN_NAME(cmf7) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700919 {
920 return f_ == rhs.f_;
921 }
922
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700923 bool operator!=(NDNBOOST_MEM_FN_NAME(cmf7) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700924 {
925 return f_ != rhs.f_;
926 }
927};
928
929// mf8
930
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700931template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(mf8)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700932{
933public:
934
935 typedef R result_type;
936
937private:
938
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700939 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8))
Jeff Thompsona28eed82013-08-22 16:21:10 -0700940 F f_;
941
942 template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const
943 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700944 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700945 }
946
947 template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const
948 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700949 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700950 }
951
952public:
953
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700954 explicit NDNBOOST_MEM_FN_NAME(mf8)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -0700955
956 R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
957 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700958 NDNBOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700959 }
960
961 template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
962 {
963 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700964 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700965 }
966
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700967#ifdef NDNBOOST_MEM_FN_ENABLE_CONST_OVERLOADS
Jeff Thompsona28eed82013-08-22 16:21:10 -0700968
969 template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
970 {
971 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700972 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700973 }
974
975#endif
976
977 R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
978 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700979 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
Jeff Thompsona28eed82013-08-22 16:21:10 -0700980 }
981
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700982 bool operator==(NDNBOOST_MEM_FN_NAME(mf8) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700983 {
984 return f_ == rhs.f_;
985 }
986
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700987 bool operator!=(NDNBOOST_MEM_FN_NAME(mf8) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -0700988 {
989 return f_ != rhs.f_;
990 }
991};
992
993// cmf8
994
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700995template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 NDNBOOST_MEM_FN_CLASS_F> class NDNBOOST_MEM_FN_NAME(cmf8)
Jeff Thompsona28eed82013-08-22 16:21:10 -0700996{
997public:
998
999 typedef R result_type;
1000
1001private:
1002
Jeff Thompson3d613fd2013-10-15 15:39:04 -07001003 NDNBOOST_MEM_FN_TYPEDEF(R (NDNBOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const)
Jeff Thompsona28eed82013-08-22 16:21:10 -07001004 F f_;
1005
1006 template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const
1007 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -07001008 NDNBOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
Jeff Thompsona28eed82013-08-22 16:21:10 -07001009 }
1010
1011 template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const
1012 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -07001013 NDNBOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
Jeff Thompsona28eed82013-08-22 16:21:10 -07001014 }
1015
1016public:
1017
Jeff Thompson3d613fd2013-10-15 15:39:04 -07001018 explicit NDNBOOST_MEM_FN_NAME(cmf8)(F f): f_(f) {}
Jeff Thompsona28eed82013-08-22 16:21:10 -07001019
1020 R operator()(T const * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
1021 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -07001022 NDNBOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
Jeff Thompsona28eed82013-08-22 16:21:10 -07001023 }
1024
1025 template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
1026 {
1027 U const * p = 0;
Jeff Thompson3d613fd2013-10-15 15:39:04 -07001028 NDNBOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8);
Jeff Thompsona28eed82013-08-22 16:21:10 -07001029 }
1030
1031 R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
1032 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -07001033 NDNBOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
Jeff Thompsona28eed82013-08-22 16:21:10 -07001034 }
1035
Jeff Thompson3d613fd2013-10-15 15:39:04 -07001036 bool operator==(NDNBOOST_MEM_FN_NAME(cmf8) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -07001037 {
1038 return f_ == rhs.f_;
1039 }
1040
Jeff Thompson3d613fd2013-10-15 15:39:04 -07001041 bool operator!=(NDNBOOST_MEM_FN_NAME(cmf8) const & rhs) const
Jeff Thompsona28eed82013-08-22 16:21:10 -07001042 {
1043 return f_ != rhs.f_;
1044 }
1045};
1046
Jeff Thompson3d613fd2013-10-15 15:39:04 -07001047#undef NDNBOOST_MEM_FN_ENABLE_CONST_OVERLOADS