[857] | 1 | //
|
---|
| 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 |
|
---|
| 15 | // mf0
|
---|
| 16 |
|
---|
| 17 | template<class R, class T BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf0)
|
---|
| 18 | {
|
---|
| 19 | public:
|
---|
| 20 |
|
---|
| 21 | typedef R result_type;
|
---|
| 22 | typedef T * argument_type;
|
---|
| 23 |
|
---|
| 24 | private:
|
---|
| 25 |
|
---|
| 26 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) ())
|
---|
| 27 | F f_;
|
---|
| 28 |
|
---|
| 29 | template<class U> R call(U & u, T const *) const
|
---|
| 30 | {
|
---|
| 31 | BOOST_MEM_FN_RETURN (u.*f_)();
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | template<class U> R call(U & u, void const *) const
|
---|
| 35 | {
|
---|
| 36 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)();
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | public:
|
---|
| 40 |
|
---|
| 41 | explicit BOOST_MEM_FN_NAME(mf0)(F f): f_(f) {}
|
---|
| 42 |
|
---|
| 43 | R operator()(T * p) const
|
---|
| 44 | {
|
---|
| 45 | BOOST_MEM_FN_RETURN (p->*f_)();
|
---|
| 46 | }
|
---|
| 47 |
|
---|
| 48 | template<class U> R operator()(U & u) const
|
---|
| 49 | {
|
---|
| 50 | BOOST_MEM_FN_RETURN call(u, &u);
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | R operator()(T & t) const
|
---|
| 54 | {
|
---|
| 55 | BOOST_MEM_FN_RETURN (t.*f_)();
|
---|
| 56 | }
|
---|
| 57 |
|
---|
| 58 | bool operator==(BOOST_MEM_FN_NAME(mf0) const & rhs) const
|
---|
| 59 | {
|
---|
| 60 | return f_ == rhs.f_;
|
---|
| 61 | }
|
---|
| 62 |
|
---|
| 63 | bool operator!=(BOOST_MEM_FN_NAME(mf0) const & rhs) const
|
---|
| 64 | {
|
---|
| 65 | return f_ != rhs.f_;
|
---|
| 66 | }
|
---|
| 67 | };
|
---|
| 68 |
|
---|
| 69 | // cmf0
|
---|
| 70 |
|
---|
| 71 | template<class R, class T BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf0)
|
---|
| 72 | {
|
---|
| 73 | public:
|
---|
| 74 |
|
---|
| 75 | typedef R result_type;
|
---|
| 76 | typedef T const * argument_type;
|
---|
| 77 |
|
---|
| 78 | private:
|
---|
| 79 |
|
---|
| 80 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) () const)
|
---|
| 81 | F f_;
|
---|
| 82 |
|
---|
| 83 | template<class U> R call(U & u, T const *) const
|
---|
| 84 | {
|
---|
| 85 | BOOST_MEM_FN_RETURN (u.*f_)();
|
---|
| 86 | }
|
---|
| 87 |
|
---|
| 88 | template<class U> R call(U & u, void const *) const
|
---|
| 89 | {
|
---|
| 90 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)();
|
---|
| 91 | }
|
---|
| 92 |
|
---|
| 93 | public:
|
---|
| 94 |
|
---|
| 95 | explicit BOOST_MEM_FN_NAME(cmf0)(F f): f_(f) {}
|
---|
| 96 |
|
---|
| 97 | template<class U> R operator()(U const & u) const
|
---|
| 98 | {
|
---|
| 99 | BOOST_MEM_FN_RETURN call(u, &u);
|
---|
| 100 | }
|
---|
| 101 |
|
---|
| 102 | R operator()(T const & t) const
|
---|
| 103 | {
|
---|
| 104 | BOOST_MEM_FN_RETURN (t.*f_)();
|
---|
| 105 | }
|
---|
| 106 |
|
---|
| 107 | bool operator==(BOOST_MEM_FN_NAME(cmf0) const & rhs) const
|
---|
| 108 | {
|
---|
| 109 | return f_ == rhs.f_;
|
---|
| 110 | }
|
---|
| 111 |
|
---|
| 112 | bool operator!=(BOOST_MEM_FN_NAME(cmf0) const & rhs) const
|
---|
| 113 | {
|
---|
| 114 | return f_ != rhs.f_;
|
---|
| 115 | }
|
---|
| 116 | };
|
---|
| 117 |
|
---|
| 118 | // mf1
|
---|
| 119 |
|
---|
| 120 | template<class R, class T, class A1 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf1)
|
---|
| 121 | {
|
---|
| 122 | public:
|
---|
| 123 |
|
---|
| 124 | typedef R result_type;
|
---|
| 125 | typedef T * first_argument_type;
|
---|
| 126 | typedef A1 second_argument_type;
|
---|
| 127 |
|
---|
| 128 | private:
|
---|
| 129 |
|
---|
| 130 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1))
|
---|
| 131 | F f_;
|
---|
| 132 |
|
---|
| 133 | template<class U, class B1> R call(U & u, T const *, B1 & b1) const
|
---|
| 134 | {
|
---|
| 135 | BOOST_MEM_FN_RETURN (u.*f_)(b1);
|
---|
| 136 | }
|
---|
| 137 |
|
---|
| 138 | template<class U, class B1> R call(U & u, void const *, B1 & b1) const
|
---|
| 139 | {
|
---|
| 140 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1);
|
---|
| 141 | }
|
---|
| 142 |
|
---|
| 143 | public:
|
---|
| 144 |
|
---|
| 145 | explicit BOOST_MEM_FN_NAME(mf1)(F f): f_(f) {}
|
---|
| 146 |
|
---|
| 147 | R operator()(T * p, A1 a1) const
|
---|
| 148 | {
|
---|
| 149 | BOOST_MEM_FN_RETURN (p->*f_)(a1);
|
---|
| 150 | }
|
---|
| 151 |
|
---|
| 152 | template<class U> R operator()(U & u, A1 a1) const
|
---|
| 153 | {
|
---|
| 154 | BOOST_MEM_FN_RETURN call(u, &u, a1);
|
---|
| 155 | }
|
---|
| 156 |
|
---|
| 157 | R operator()(T & t, A1 a1) const
|
---|
| 158 | {
|
---|
| 159 | BOOST_MEM_FN_RETURN (t.*f_)(a1);
|
---|
| 160 | }
|
---|
| 161 |
|
---|
| 162 | bool operator==(BOOST_MEM_FN_NAME(mf1) const & rhs) const
|
---|
| 163 | {
|
---|
| 164 | return f_ == rhs.f_;
|
---|
| 165 | }
|
---|
| 166 |
|
---|
| 167 | bool operator!=(BOOST_MEM_FN_NAME(mf1) const & rhs) const
|
---|
| 168 | {
|
---|
| 169 | return f_ != rhs.f_;
|
---|
| 170 | }
|
---|
| 171 | };
|
---|
| 172 |
|
---|
| 173 | // cmf1
|
---|
| 174 |
|
---|
| 175 | template<class R, class T, class A1 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf1)
|
---|
| 176 | {
|
---|
| 177 | public:
|
---|
| 178 |
|
---|
| 179 | typedef R result_type;
|
---|
| 180 | typedef T const * first_argument_type;
|
---|
| 181 | typedef A1 second_argument_type;
|
---|
| 182 |
|
---|
| 183 | private:
|
---|
| 184 |
|
---|
| 185 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1) const)
|
---|
| 186 | F f_;
|
---|
| 187 |
|
---|
| 188 | template<class U, class B1> R call(U & u, T const *, B1 & b1) const
|
---|
| 189 | {
|
---|
| 190 | BOOST_MEM_FN_RETURN (u.*f_)(b1);
|
---|
| 191 | }
|
---|
| 192 |
|
---|
| 193 | template<class U, class B1> R call(U & u, void const *, B1 & b1) const
|
---|
| 194 | {
|
---|
| 195 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1);
|
---|
| 196 | }
|
---|
| 197 |
|
---|
| 198 | public:
|
---|
| 199 |
|
---|
| 200 | explicit BOOST_MEM_FN_NAME(cmf1)(F f): f_(f) {}
|
---|
| 201 |
|
---|
| 202 | template<class U> R operator()(U const & u, A1 a1) const
|
---|
| 203 | {
|
---|
| 204 | BOOST_MEM_FN_RETURN call(u, &u, a1);
|
---|
| 205 | }
|
---|
| 206 |
|
---|
| 207 | R operator()(T const & t, A1 a1) const
|
---|
| 208 | {
|
---|
| 209 | BOOST_MEM_FN_RETURN (t.*f_)(a1);
|
---|
| 210 | }
|
---|
| 211 |
|
---|
| 212 | bool operator==(BOOST_MEM_FN_NAME(cmf1) const & rhs) const
|
---|
| 213 | {
|
---|
| 214 | return f_ == rhs.f_;
|
---|
| 215 | }
|
---|
| 216 |
|
---|
| 217 | bool operator!=(BOOST_MEM_FN_NAME(cmf1) const & rhs) const
|
---|
| 218 | {
|
---|
| 219 | return f_ != rhs.f_;
|
---|
| 220 | }
|
---|
| 221 | };
|
---|
| 222 |
|
---|
| 223 | // mf2
|
---|
| 224 |
|
---|
| 225 | template<class R, class T, class A1, class A2 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf2)
|
---|
| 226 | {
|
---|
| 227 | public:
|
---|
| 228 |
|
---|
| 229 | typedef R result_type;
|
---|
| 230 |
|
---|
| 231 | private:
|
---|
| 232 |
|
---|
| 233 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2))
|
---|
| 234 | F f_;
|
---|
| 235 |
|
---|
| 236 | template<class U, class B1, class B2> R call(U & u, T const *, B1 & b1, B2 & b2) const
|
---|
| 237 | {
|
---|
| 238 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2);
|
---|
| 239 | }
|
---|
| 240 |
|
---|
| 241 | template<class U, class B1, class B2> R call(U & u, void const *, B1 & b1, B2 & b2) const
|
---|
| 242 | {
|
---|
| 243 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2);
|
---|
| 244 | }
|
---|
| 245 |
|
---|
| 246 | public:
|
---|
| 247 |
|
---|
| 248 | explicit BOOST_MEM_FN_NAME(mf2)(F f): f_(f) {}
|
---|
| 249 |
|
---|
| 250 | R operator()(T * p, A1 a1, A2 a2) const
|
---|
| 251 | {
|
---|
| 252 | BOOST_MEM_FN_RETURN (p->*f_)(a1, a2);
|
---|
| 253 | }
|
---|
| 254 |
|
---|
| 255 | template<class U> R operator()(U & u, A1 a1, A2 a2) const
|
---|
| 256 | {
|
---|
| 257 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2);
|
---|
| 258 | }
|
---|
| 259 |
|
---|
| 260 | R operator()(T & t, A1 a1, A2 a2) const
|
---|
| 261 | {
|
---|
| 262 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2);
|
---|
| 263 | }
|
---|
| 264 |
|
---|
| 265 | bool operator==(BOOST_MEM_FN_NAME(mf2) const & rhs) const
|
---|
| 266 | {
|
---|
| 267 | return f_ == rhs.f_;
|
---|
| 268 | }
|
---|
| 269 |
|
---|
| 270 | bool operator!=(BOOST_MEM_FN_NAME(mf2) const & rhs) const
|
---|
| 271 | {
|
---|
| 272 | return f_ != rhs.f_;
|
---|
| 273 | }
|
---|
| 274 | };
|
---|
| 275 |
|
---|
| 276 | // cmf2
|
---|
| 277 |
|
---|
| 278 | template<class R, class T, class A1, class A2 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf2)
|
---|
| 279 | {
|
---|
| 280 | public:
|
---|
| 281 |
|
---|
| 282 | typedef R result_type;
|
---|
| 283 |
|
---|
| 284 | private:
|
---|
| 285 |
|
---|
| 286 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2) const)
|
---|
| 287 | F f_;
|
---|
| 288 |
|
---|
| 289 | template<class U, class B1, class B2> R call(U & u, T const *, B1 & b1, B2 & b2) const
|
---|
| 290 | {
|
---|
| 291 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2);
|
---|
| 292 | }
|
---|
| 293 |
|
---|
| 294 | template<class U, class B1, class B2> R call(U & u, void const *, B1 & b1, B2 & b2) const
|
---|
| 295 | {
|
---|
| 296 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2);
|
---|
| 297 | }
|
---|
| 298 |
|
---|
| 299 | public:
|
---|
| 300 |
|
---|
| 301 | explicit BOOST_MEM_FN_NAME(cmf2)(F f): f_(f) {}
|
---|
| 302 |
|
---|
| 303 | template<class U> R operator()(U const & u, A1 a1, A2 a2) const
|
---|
| 304 | {
|
---|
| 305 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2);
|
---|
| 306 | }
|
---|
| 307 |
|
---|
| 308 | R operator()(T const & t, A1 a1, A2 a2) const
|
---|
| 309 | {
|
---|
| 310 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2);
|
---|
| 311 | }
|
---|
| 312 |
|
---|
| 313 | bool operator==(BOOST_MEM_FN_NAME(cmf2) const & rhs) const
|
---|
| 314 | {
|
---|
| 315 | return f_ == rhs.f_;
|
---|
| 316 | }
|
---|
| 317 |
|
---|
| 318 | bool operator!=(BOOST_MEM_FN_NAME(cmf2) const & rhs) const
|
---|
| 319 | {
|
---|
| 320 | return f_ != rhs.f_;
|
---|
| 321 | }
|
---|
| 322 | };
|
---|
| 323 |
|
---|
| 324 | // mf3
|
---|
| 325 |
|
---|
| 326 | template<class R, class T, class A1, class A2, class A3 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf3)
|
---|
| 327 | {
|
---|
| 328 | public:
|
---|
| 329 |
|
---|
| 330 | typedef R result_type;
|
---|
| 331 |
|
---|
| 332 | private:
|
---|
| 333 |
|
---|
| 334 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3))
|
---|
| 335 | F f_;
|
---|
| 336 |
|
---|
| 337 | template<class U, class B1, class B2, class B3> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const
|
---|
| 338 | {
|
---|
| 339 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3);
|
---|
| 340 | }
|
---|
| 341 |
|
---|
| 342 | template<class U, class B1, class B2, class B3> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const
|
---|
| 343 | {
|
---|
| 344 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3);
|
---|
| 345 | }
|
---|
| 346 |
|
---|
| 347 | public:
|
---|
| 348 |
|
---|
| 349 | explicit BOOST_MEM_FN_NAME(mf3)(F f): f_(f) {}
|
---|
| 350 |
|
---|
| 351 | R operator()(T * p, A1 a1, A2 a2, A3 a3) const
|
---|
| 352 | {
|
---|
| 353 | BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3);
|
---|
| 354 | }
|
---|
| 355 |
|
---|
| 356 | template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3) const
|
---|
| 357 | {
|
---|
| 358 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3);
|
---|
| 359 | }
|
---|
| 360 |
|
---|
| 361 | R operator()(T & t, A1 a1, A2 a2, A3 a3) const
|
---|
| 362 | {
|
---|
| 363 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3);
|
---|
| 364 | }
|
---|
| 365 |
|
---|
| 366 | bool operator==(BOOST_MEM_FN_NAME(mf3) const & rhs) const
|
---|
| 367 | {
|
---|
| 368 | return f_ == rhs.f_;
|
---|
| 369 | }
|
---|
| 370 |
|
---|
| 371 | bool operator!=(BOOST_MEM_FN_NAME(mf3) const & rhs) const
|
---|
| 372 | {
|
---|
| 373 | return f_ != rhs.f_;
|
---|
| 374 | }
|
---|
| 375 | };
|
---|
| 376 |
|
---|
| 377 | // cmf3
|
---|
| 378 |
|
---|
| 379 | template<class R, class T, class A1, class A2, class A3 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf3)
|
---|
| 380 | {
|
---|
| 381 | public:
|
---|
| 382 |
|
---|
| 383 | typedef R result_type;
|
---|
| 384 |
|
---|
| 385 | private:
|
---|
| 386 |
|
---|
| 387 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const)
|
---|
| 388 | F f_;
|
---|
| 389 |
|
---|
| 390 | template<class U, class B1, class B2, class B3> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const
|
---|
| 391 | {
|
---|
| 392 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3);
|
---|
| 393 | }
|
---|
| 394 |
|
---|
| 395 | template<class U, class B1, class B2, class B3> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const
|
---|
| 396 | {
|
---|
| 397 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3);
|
---|
| 398 | }
|
---|
| 399 |
|
---|
| 400 | public:
|
---|
| 401 |
|
---|
| 402 | explicit BOOST_MEM_FN_NAME(cmf3)(F f): f_(f) {}
|
---|
| 403 |
|
---|
| 404 | template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3) const
|
---|
| 405 | {
|
---|
| 406 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3);
|
---|
| 407 | }
|
---|
| 408 |
|
---|
| 409 | R operator()(T const & t, A1 a1, A2 a2, A3 a3) const
|
---|
| 410 | {
|
---|
| 411 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3);
|
---|
| 412 | }
|
---|
| 413 |
|
---|
| 414 | bool operator==(BOOST_MEM_FN_NAME(cmf3) const & rhs) const
|
---|
| 415 | {
|
---|
| 416 | return f_ == rhs.f_;
|
---|
| 417 | }
|
---|
| 418 |
|
---|
| 419 | bool operator!=(BOOST_MEM_FN_NAME(cmf3) const & rhs) const
|
---|
| 420 | {
|
---|
| 421 | return f_ != rhs.f_;
|
---|
| 422 | }
|
---|
| 423 | };
|
---|
| 424 |
|
---|
| 425 | // mf4
|
---|
| 426 |
|
---|
| 427 | template<class R, class T, class A1, class A2, class A3, class A4 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf4)
|
---|
| 428 | {
|
---|
| 429 | public:
|
---|
| 430 |
|
---|
| 431 | typedef R result_type;
|
---|
| 432 |
|
---|
| 433 | private:
|
---|
| 434 |
|
---|
| 435 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4))
|
---|
| 436 | F f_;
|
---|
| 437 |
|
---|
| 438 | 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
|
---|
| 439 | {
|
---|
| 440 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4);
|
---|
| 441 | }
|
---|
| 442 |
|
---|
| 443 | 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
|
---|
| 444 | {
|
---|
| 445 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4);
|
---|
| 446 | }
|
---|
| 447 |
|
---|
| 448 | public:
|
---|
| 449 |
|
---|
| 450 | explicit BOOST_MEM_FN_NAME(mf4)(F f): f_(f) {}
|
---|
| 451 |
|
---|
| 452 | R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4) const
|
---|
| 453 | {
|
---|
| 454 | BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4);
|
---|
| 455 | }
|
---|
| 456 |
|
---|
| 457 | template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4) const
|
---|
| 458 | {
|
---|
| 459 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4);
|
---|
| 460 | }
|
---|
| 461 |
|
---|
| 462 | R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4) const
|
---|
| 463 | {
|
---|
| 464 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4);
|
---|
| 465 | }
|
---|
| 466 |
|
---|
| 467 | bool operator==(BOOST_MEM_FN_NAME(mf4) const & rhs) const
|
---|
| 468 | {
|
---|
| 469 | return f_ == rhs.f_;
|
---|
| 470 | }
|
---|
| 471 |
|
---|
| 472 | bool operator!=(BOOST_MEM_FN_NAME(mf4) const & rhs) const
|
---|
| 473 | {
|
---|
| 474 | return f_ != rhs.f_;
|
---|
| 475 | }
|
---|
| 476 | };
|
---|
| 477 |
|
---|
| 478 | // cmf4
|
---|
| 479 |
|
---|
| 480 | template<class R, class T, class A1, class A2, class A3, class A4 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf4)
|
---|
| 481 | {
|
---|
| 482 | public:
|
---|
| 483 |
|
---|
| 484 | typedef R result_type;
|
---|
| 485 |
|
---|
| 486 | private:
|
---|
| 487 |
|
---|
| 488 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const)
|
---|
| 489 | F f_;
|
---|
| 490 |
|
---|
| 491 | 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
|
---|
| 492 | {
|
---|
| 493 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4);
|
---|
| 494 | }
|
---|
| 495 |
|
---|
| 496 | 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
|
---|
| 497 | {
|
---|
| 498 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4);
|
---|
| 499 | }
|
---|
| 500 |
|
---|
| 501 | public:
|
---|
| 502 |
|
---|
| 503 | explicit BOOST_MEM_FN_NAME(cmf4)(F f): f_(f) {}
|
---|
| 504 |
|
---|
| 505 | template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const
|
---|
| 506 | {
|
---|
| 507 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4);
|
---|
| 508 | }
|
---|
| 509 |
|
---|
| 510 | R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4) const
|
---|
| 511 | {
|
---|
| 512 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4);
|
---|
| 513 | }
|
---|
| 514 |
|
---|
| 515 | bool operator==(BOOST_MEM_FN_NAME(cmf4) const & rhs) const
|
---|
| 516 | {
|
---|
| 517 | return f_ == rhs.f_;
|
---|
| 518 | }
|
---|
| 519 |
|
---|
| 520 | bool operator!=(BOOST_MEM_FN_NAME(cmf4) const & rhs) const
|
---|
| 521 | {
|
---|
| 522 | return f_ != rhs.f_;
|
---|
| 523 | }
|
---|
| 524 | };
|
---|
| 525 |
|
---|
| 526 | // mf5
|
---|
| 527 |
|
---|
| 528 | template<class R, class T, class A1, class A2, class A3, class A4, class A5 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf5)
|
---|
| 529 | {
|
---|
| 530 | public:
|
---|
| 531 |
|
---|
| 532 | typedef R result_type;
|
---|
| 533 |
|
---|
| 534 | private:
|
---|
| 535 |
|
---|
| 536 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5))
|
---|
| 537 | F f_;
|
---|
| 538 |
|
---|
| 539 | 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
|
---|
| 540 | {
|
---|
| 541 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5);
|
---|
| 542 | }
|
---|
| 543 |
|
---|
| 544 | 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
|
---|
| 545 | {
|
---|
| 546 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5);
|
---|
| 547 | }
|
---|
| 548 |
|
---|
| 549 | public:
|
---|
| 550 |
|
---|
| 551 | explicit BOOST_MEM_FN_NAME(mf5)(F f): f_(f) {}
|
---|
| 552 |
|
---|
| 553 | R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
|
---|
| 554 | {
|
---|
| 555 | BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5);
|
---|
| 556 | }
|
---|
| 557 |
|
---|
| 558 | template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
|
---|
| 559 | {
|
---|
| 560 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5);
|
---|
| 561 | }
|
---|
| 562 |
|
---|
| 563 | R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
|
---|
| 564 | {
|
---|
| 565 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5);
|
---|
| 566 | }
|
---|
| 567 |
|
---|
| 568 | bool operator==(BOOST_MEM_FN_NAME(mf5) const & rhs) const
|
---|
| 569 | {
|
---|
| 570 | return f_ == rhs.f_;
|
---|
| 571 | }
|
---|
| 572 |
|
---|
| 573 | bool operator!=(BOOST_MEM_FN_NAME(mf5) const & rhs) const
|
---|
| 574 | {
|
---|
| 575 | return f_ != rhs.f_;
|
---|
| 576 | }
|
---|
| 577 | };
|
---|
| 578 |
|
---|
| 579 | // cmf5
|
---|
| 580 |
|
---|
| 581 | template<class R, class T, class A1, class A2, class A3, class A4, class A5 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf5)
|
---|
| 582 | {
|
---|
| 583 | public:
|
---|
| 584 |
|
---|
| 585 | typedef R result_type;
|
---|
| 586 |
|
---|
| 587 | private:
|
---|
| 588 |
|
---|
| 589 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const)
|
---|
| 590 | F f_;
|
---|
| 591 |
|
---|
| 592 | 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
|
---|
| 593 | {
|
---|
| 594 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5);
|
---|
| 595 | }
|
---|
| 596 |
|
---|
| 597 | 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
|
---|
| 598 | {
|
---|
| 599 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5);
|
---|
| 600 | }
|
---|
| 601 |
|
---|
| 602 | public:
|
---|
| 603 |
|
---|
| 604 | explicit BOOST_MEM_FN_NAME(cmf5)(F f): f_(f) {}
|
---|
| 605 |
|
---|
| 606 | template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
|
---|
| 607 | {
|
---|
| 608 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5);
|
---|
| 609 | }
|
---|
| 610 |
|
---|
| 611 | R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
|
---|
| 612 | {
|
---|
| 613 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5);
|
---|
| 614 | }
|
---|
| 615 |
|
---|
| 616 | bool operator==(BOOST_MEM_FN_NAME(cmf5) const & rhs) const
|
---|
| 617 | {
|
---|
| 618 | return f_ == rhs.f_;
|
---|
| 619 | }
|
---|
| 620 |
|
---|
| 621 | bool operator!=(BOOST_MEM_FN_NAME(cmf5) const & rhs) const
|
---|
| 622 | {
|
---|
| 623 | return f_ != rhs.f_;
|
---|
| 624 | }
|
---|
| 625 | };
|
---|
| 626 |
|
---|
| 627 | // mf6
|
---|
| 628 |
|
---|
| 629 | template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf6)
|
---|
| 630 | {
|
---|
| 631 | public:
|
---|
| 632 |
|
---|
| 633 | typedef R result_type;
|
---|
| 634 |
|
---|
| 635 | private:
|
---|
| 636 |
|
---|
| 637 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6))
|
---|
| 638 | F f_;
|
---|
| 639 |
|
---|
| 640 | 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
|
---|
| 641 | {
|
---|
| 642 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6);
|
---|
| 643 | }
|
---|
| 644 |
|
---|
| 645 | 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
|
---|
| 646 | {
|
---|
| 647 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6);
|
---|
| 648 | }
|
---|
| 649 |
|
---|
| 650 | public:
|
---|
| 651 |
|
---|
| 652 | explicit BOOST_MEM_FN_NAME(mf6)(F f): f_(f) {}
|
---|
| 653 |
|
---|
| 654 | R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
|
---|
| 655 | {
|
---|
| 656 | BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6);
|
---|
| 657 | }
|
---|
| 658 |
|
---|
| 659 | template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
|
---|
| 660 | {
|
---|
| 661 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6);
|
---|
| 662 | }
|
---|
| 663 |
|
---|
| 664 | R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
|
---|
| 665 | {
|
---|
| 666 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6);
|
---|
| 667 | }
|
---|
| 668 |
|
---|
| 669 | bool operator==(BOOST_MEM_FN_NAME(mf6) const & rhs) const
|
---|
| 670 | {
|
---|
| 671 | return f_ == rhs.f_;
|
---|
| 672 | }
|
---|
| 673 |
|
---|
| 674 | bool operator!=(BOOST_MEM_FN_NAME(mf6) const & rhs) const
|
---|
| 675 | {
|
---|
| 676 | return f_ != rhs.f_;
|
---|
| 677 | }
|
---|
| 678 | };
|
---|
| 679 |
|
---|
| 680 | // cmf6
|
---|
| 681 |
|
---|
| 682 | template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf6)
|
---|
| 683 | {
|
---|
| 684 | public:
|
---|
| 685 |
|
---|
| 686 | typedef R result_type;
|
---|
| 687 |
|
---|
| 688 | private:
|
---|
| 689 |
|
---|
| 690 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const)
|
---|
| 691 | F f_;
|
---|
| 692 |
|
---|
| 693 | 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
|
---|
| 694 | {
|
---|
| 695 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6);
|
---|
| 696 | }
|
---|
| 697 |
|
---|
| 698 | 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
|
---|
| 699 | {
|
---|
| 700 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6);
|
---|
| 701 | }
|
---|
| 702 |
|
---|
| 703 | public:
|
---|
| 704 |
|
---|
| 705 | explicit BOOST_MEM_FN_NAME(cmf6)(F f): f_(f) {}
|
---|
| 706 |
|
---|
| 707 | template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
|
---|
| 708 | {
|
---|
| 709 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6);
|
---|
| 710 | }
|
---|
| 711 |
|
---|
| 712 | R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
|
---|
| 713 | {
|
---|
| 714 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6);
|
---|
| 715 | }
|
---|
| 716 |
|
---|
| 717 | bool operator==(BOOST_MEM_FN_NAME(cmf6) const & rhs) const
|
---|
| 718 | {
|
---|
| 719 | return f_ == rhs.f_;
|
---|
| 720 | }
|
---|
| 721 |
|
---|
| 722 | bool operator!=(BOOST_MEM_FN_NAME(cmf6) const & rhs) const
|
---|
| 723 | {
|
---|
| 724 | return f_ != rhs.f_;
|
---|
| 725 | }
|
---|
| 726 | };
|
---|
| 727 |
|
---|
| 728 | // mf7
|
---|
| 729 |
|
---|
| 730 | template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf7)
|
---|
| 731 | {
|
---|
| 732 | public:
|
---|
| 733 |
|
---|
| 734 | typedef R result_type;
|
---|
| 735 |
|
---|
| 736 | private:
|
---|
| 737 |
|
---|
| 738 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7))
|
---|
| 739 | F f_;
|
---|
| 740 |
|
---|
| 741 | 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
|
---|
| 742 | {
|
---|
| 743 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7);
|
---|
| 744 | }
|
---|
| 745 |
|
---|
| 746 | 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
|
---|
| 747 | {
|
---|
| 748 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7);
|
---|
| 749 | }
|
---|
| 750 |
|
---|
| 751 | public:
|
---|
| 752 |
|
---|
| 753 | explicit BOOST_MEM_FN_NAME(mf7)(F f): f_(f) {}
|
---|
| 754 |
|
---|
| 755 | R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
|
---|
| 756 | {
|
---|
| 757 | BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7);
|
---|
| 758 | }
|
---|
| 759 |
|
---|
| 760 | template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
|
---|
| 761 | {
|
---|
| 762 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6, a7);
|
---|
| 763 | }
|
---|
| 764 |
|
---|
| 765 | R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
|
---|
| 766 | {
|
---|
| 767 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7);
|
---|
| 768 | }
|
---|
| 769 |
|
---|
| 770 | bool operator==(BOOST_MEM_FN_NAME(mf7) const & rhs) const
|
---|
| 771 | {
|
---|
| 772 | return f_ == rhs.f_;
|
---|
| 773 | }
|
---|
| 774 |
|
---|
| 775 | bool operator!=(BOOST_MEM_FN_NAME(mf7) const & rhs) const
|
---|
| 776 | {
|
---|
| 777 | return f_ != rhs.f_;
|
---|
| 778 | }
|
---|
| 779 | };
|
---|
| 780 |
|
---|
| 781 | // cmf7
|
---|
| 782 |
|
---|
| 783 | template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf7)
|
---|
| 784 | {
|
---|
| 785 | public:
|
---|
| 786 |
|
---|
| 787 | typedef R result_type;
|
---|
| 788 |
|
---|
| 789 | private:
|
---|
| 790 |
|
---|
| 791 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const)
|
---|
| 792 | F f_;
|
---|
| 793 |
|
---|
| 794 | 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
|
---|
| 795 | {
|
---|
| 796 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7);
|
---|
| 797 | }
|
---|
| 798 |
|
---|
| 799 | 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
|
---|
| 800 | {
|
---|
| 801 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7);
|
---|
| 802 | }
|
---|
| 803 |
|
---|
| 804 | public:
|
---|
| 805 |
|
---|
| 806 | explicit BOOST_MEM_FN_NAME(cmf7)(F f): f_(f) {}
|
---|
| 807 |
|
---|
| 808 | template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
|
---|
| 809 | {
|
---|
| 810 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6, a7);
|
---|
| 811 | }
|
---|
| 812 |
|
---|
| 813 | R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
|
---|
| 814 | {
|
---|
| 815 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7);
|
---|
| 816 | }
|
---|
| 817 |
|
---|
| 818 | bool operator==(BOOST_MEM_FN_NAME(cmf7) const & rhs) const
|
---|
| 819 | {
|
---|
| 820 | return f_ == rhs.f_;
|
---|
| 821 | }
|
---|
| 822 |
|
---|
| 823 | bool operator!=(BOOST_MEM_FN_NAME(cmf7) const & rhs) const
|
---|
| 824 | {
|
---|
| 825 | return f_ != rhs.f_;
|
---|
| 826 | }
|
---|
| 827 | };
|
---|
| 828 |
|
---|
| 829 | // mf8
|
---|
| 830 |
|
---|
| 831 | template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf8)
|
---|
| 832 | {
|
---|
| 833 | public:
|
---|
| 834 |
|
---|
| 835 | typedef R result_type;
|
---|
| 836 |
|
---|
| 837 | private:
|
---|
| 838 |
|
---|
| 839 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8))
|
---|
| 840 | F f_;
|
---|
| 841 |
|
---|
| 842 | 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
|
---|
| 843 | {
|
---|
| 844 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
|
---|
| 845 | }
|
---|
| 846 |
|
---|
| 847 | 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
|
---|
| 848 | {
|
---|
| 849 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
|
---|
| 850 | }
|
---|
| 851 |
|
---|
| 852 | public:
|
---|
| 853 |
|
---|
| 854 | explicit BOOST_MEM_FN_NAME(mf8)(F f): f_(f) {}
|
---|
| 855 |
|
---|
| 856 | R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
|
---|
| 857 | {
|
---|
| 858 | BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
|
---|
| 859 | }
|
---|
| 860 |
|
---|
| 861 | template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
|
---|
| 862 | {
|
---|
| 863 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6, a7, a8);
|
---|
| 864 | }
|
---|
| 865 |
|
---|
| 866 | R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
|
---|
| 867 | {
|
---|
| 868 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
|
---|
| 869 | }
|
---|
| 870 |
|
---|
| 871 | bool operator==(BOOST_MEM_FN_NAME(mf8) const & rhs) const
|
---|
| 872 | {
|
---|
| 873 | return f_ == rhs.f_;
|
---|
| 874 | }
|
---|
| 875 |
|
---|
| 876 | bool operator!=(BOOST_MEM_FN_NAME(mf8) const & rhs) const
|
---|
| 877 | {
|
---|
| 878 | return f_ != rhs.f_;
|
---|
| 879 | }
|
---|
| 880 | };
|
---|
| 881 |
|
---|
| 882 | // cmf8
|
---|
| 883 |
|
---|
| 884 | template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf8)
|
---|
| 885 | {
|
---|
| 886 | public:
|
---|
| 887 |
|
---|
| 888 | typedef R result_type;
|
---|
| 889 |
|
---|
| 890 | private:
|
---|
| 891 |
|
---|
| 892 | BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const)
|
---|
| 893 | F f_;
|
---|
| 894 |
|
---|
| 895 | 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
|
---|
| 896 | {
|
---|
| 897 | BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
|
---|
| 898 | }
|
---|
| 899 |
|
---|
| 900 | 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
|
---|
| 901 | {
|
---|
| 902 | BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
|
---|
| 903 | }
|
---|
| 904 |
|
---|
| 905 | public:
|
---|
| 906 |
|
---|
| 907 | explicit BOOST_MEM_FN_NAME(cmf8)(F f): f_(f) {}
|
---|
| 908 |
|
---|
| 909 | R operator()(T const * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
|
---|
| 910 | {
|
---|
| 911 | BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
|
---|
| 912 | }
|
---|
| 913 |
|
---|
| 914 | 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
|
---|
| 915 | {
|
---|
| 916 | BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6, a7, a8);
|
---|
| 917 | }
|
---|
| 918 |
|
---|
| 919 | R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
|
---|
| 920 | {
|
---|
| 921 | BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
|
---|
| 922 | }
|
---|
| 923 |
|
---|
| 924 | bool operator==(BOOST_MEM_FN_NAME(cmf8) const & rhs) const
|
---|
| 925 | {
|
---|
| 926 | return f_ == rhs.f_;
|
---|
| 927 | }
|
---|
| 928 |
|
---|
| 929 | bool operator!=(BOOST_MEM_FN_NAME(cmf8) const & rhs) const
|
---|
| 930 | {
|
---|
| 931 | return f_ != rhs.f_;
|
---|
| 932 | }
|
---|
| 933 | };
|
---|
| 934 |
|
---|