1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/spirit/phoenix/binders.hpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,4067 @@
1.4 +/*=============================================================================
1.5 + Phoenix v1.2
1.6 + Copyright (c) 2001-2002 Joel de Guzman
1.7 +
1.8 + Use, modification and distribution is subject to the Boost Software
1.9 + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
1.10 + http://www.boost.org/LICENSE_1_0.txt)
1.11 +==============================================================================*/
1.12 +#ifndef PHOENIX_BINDERS_HPP
1.13 +#define PHOENIX_BINDERS_HPP
1.14 +
1.15 +///////////////////////////////////////////////////////////////////////////////
1.16 +#include <boost/spirit/phoenix/functions.hpp>
1.17 +#include <boost/type_traits/is_const.hpp>
1.18 +#include <boost/mpl/if.hpp>
1.19 +
1.20 +///////////////////////////////////////////////////////////////////////////////
1.21 +namespace phoenix {
1.22 +
1.23 +///////////////////////////////////////////////////////////////////////////////
1.24 +//
1.25 +// Binders
1.26 +//
1.27 +// There are times when it is desireable to bind a simple functor,
1.28 +// function, member function or member variable for deferred
1.29 +// evaluation. This can be done through the binding facilities
1.30 +// provided below. There are template classes:
1.31 +//
1.32 +// 1) function_ptr ( function pointer binder )
1.33 +// 2) functor ( functor pointer binder )
1.34 +// 3) member_function_ptr ( member function pointer binder )
1.35 +// 4) member_var_ptr ( member variable pointer binder )
1.36 +//
1.37 +// These template classes are specialized lazy function classes for
1.38 +// functors, function pointers, member function pointers and member
1.39 +// variable pointers, respectively. These are subclasses of the
1.40 +// lazy-function class (see functions.hpp). Each of these has a
1.41 +// corresponding overloaded bind(x) function. Each bind(x) function
1.42 +// generates a suitable binder object.
1.43 +//
1.44 +// Example, given a function foo:
1.45 +//
1.46 +// void foo_(int n) { std::cout << n << std::endl; }
1.47 +//
1.48 +// Here's how the function foo is bound:
1.49 +//
1.50 +// bind(&foo_)
1.51 +//
1.52 +// This bind expression results to a lazy-function (see
1.53 +// functions.hpp) that is lazily evaluated. This bind expression is
1.54 +// also equivalent to:
1.55 +//
1.56 +// function_ptr<void, int> foo = &foo_;
1.57 +//
1.58 +// The template parameter of the function_ptr is the return and
1.59 +// argument types of actual signature of the function to be bound
1.60 +// read from left to right:
1.61 +//
1.62 +// void foo_(int); ---> function_ptr<void, int>
1.63 +//
1.64 +// Either bind(&foo_) and its equivalent foo can now be used in the
1.65 +// same way a lazy function (see functions.hpp) is used:
1.66 +//
1.67 +// bind(&foo_)(arg1)
1.68 +//
1.69 +// or
1.70 +//
1.71 +// foo(arg1)
1.72 +//
1.73 +// The latter, of course, being much easier to understand. This is
1.74 +// now a full-fledged lazy function that can finally be evaluated
1.75 +// by another function call invocation. A second function call will
1.76 +// invoke the actual foo function:
1.77 +//
1.78 +// int i = 4;
1.79 +// foo(arg1)(i);
1.80 +//
1.81 +// will print out "4".
1.82 +//
1.83 +// Binding functors and member functions can be done similarly.
1.84 +// Here's how to bind a functor (e.g. std::plus<int>):
1.85 +//
1.86 +// bind(std::plus<int>())
1.87 +//
1.88 +// or
1.89 +//
1.90 +// functor<std::plus<int> > plus;
1.91 +//
1.92 +// Again, these are full-fledged lazy functions. In this case,
1.93 +// unlike the first example, expect 2 arguments (std::plus<int>
1.94 +// needs two arguments lhs and rhs). Either or both of which can be
1.95 +// lazily bound:
1.96 +//
1.97 +// plus(arg1, arg2) // arg1 + arg2
1.98 +// plus(100, arg1) // 100 + arg1
1.99 +// plus(100, 200) // 300
1.100 +//
1.101 +// A bound member function takes in a pointer or reference to an
1.102 +// object as the first argument. For instance, given:
1.103 +//
1.104 +// struct xyz { void foo(int) const; };
1.105 +//
1.106 +// xyz's foo member function can be bound as:
1.107 +//
1.108 +// bind(&xyz::foo)
1.109 +//
1.110 +// or
1.111 +//
1.112 +// member_function_ptr<void, xyz, int> xyz_foo = &xyz::foo;
1.113 +//
1.114 +// The template parameter of the member_function_ptr is the return,
1.115 +// class and argument types of actual signature of the function to
1.116 +// be bound read from left to right:
1.117 +//
1.118 +// void xyz::foo_(int); ---> member_function_ptr<void, xyz, int>
1.119 +//
1.120 +// Take note that a member_function_ptr lazy-function expects the
1.121 +// first argument to be a pointer or reference to an object. Both
1.122 +// the object (reference or pointer) and the arguments can be
1.123 +// lazily bound. Examples:
1.124 +//
1.125 +// xyz obj;
1.126 +// xyz_foo(arg1, arg2) // arg1.foo(arg2)
1.127 +// xyz_foo(obj, arg1) // obj.foo(arg1)
1.128 +// xyz_foo(obj, 100) // obj.foo(100)
1.129 +//
1.130 +// Be reminded that var(obj) must be used to call non-const member
1.131 +// functions. For example, if xyz was declared as:
1.132 +//
1.133 +// struct xyz { void foo(int); };
1.134 +//
1.135 +// the pointer or reference to the object must also be non-const.
1.136 +// Lazily bound arguments are stored as const value by default (see
1.137 +// variable class in primitives.hpp).
1.138 +//
1.139 +// xyz_foo(var(obj), 100) // obj.foo(100)
1.140 +//
1.141 +// Finally, member variables can be bound much like member
1.142 +// functions. For instance, given:
1.143 +//
1.144 +// struct xyz { int v; };
1.145 +//
1.146 +// xyz::v can be bound as:
1.147 +//
1.148 +// bind(&xyz::v)
1.149 +// or
1.150 +//
1.151 +// member_var_ptr<int, xyz> xyz_v = &xyz::v;
1.152 +//
1.153 +// The template parameter of the member_var_ptr is the type of the
1.154 +// variable followed by the class:
1.155 +//
1.156 +// int xyz::v; ---> member_var_ptr<int, xyz>
1.157 +//
1.158 +// Just like the member_function_ptr, member_var_ptr also expects
1.159 +// the first argument to be a pointer or reference to an object.
1.160 +// Both the object (reference or pointer) and the arguments can be
1.161 +// lazily bound. Examples:
1.162 +//
1.163 +// xyz obj;
1.164 +// xyz_v(arg1) // arg1.v
1.165 +// xyz_v(obj) // obj.v
1.166 +//
1.167 +///////////////////////////////////////////////////////////////////////////////
1.168 +
1.169 +///////////////////////////////////////////////////////////////////////////////
1.170 +//
1.171 +// Functor binder
1.172 +//
1.173 +///////////////////////////////////////////////////////////////////////////////
1.174 +template <typename FuncT>
1.175 +struct functor_action : public FuncT {
1.176 +
1.177 +#if !defined(__BORLANDC__) && (!defined(__MWERKS__) || (__MWERKS__ > 0x3002))
1.178 +
1.179 + template <
1.180 + typename A = nil_t
1.181 + , typename B = nil_t
1.182 + , typename C = nil_t
1.183 +
1.184 +#if PHOENIX_LIMIT > 3
1.185 + , typename D = nil_t
1.186 + , typename E = nil_t
1.187 + , typename F = nil_t
1.188 +
1.189 +#if PHOENIX_LIMIT > 6
1.190 + , typename G = nil_t
1.191 + , typename H = nil_t
1.192 + , typename I = nil_t
1.193 +
1.194 +#if PHOENIX_LIMIT > 9
1.195 + , typename J = nil_t
1.196 + , typename K = nil_t
1.197 + , typename L = nil_t
1.198 +
1.199 +#if PHOENIX_LIMIT > 12
1.200 + , typename M = nil_t
1.201 + , typename N = nil_t
1.202 + , typename O = nil_t
1.203 +
1.204 +#endif
1.205 +#endif
1.206 +#endif
1.207 +#endif
1.208 + >
1.209 + struct result { typedef typename FuncT::result_type type; };
1.210 +#endif
1.211 +
1.212 + functor_action(FuncT fptr_ = FuncT())
1.213 + : FuncT(fptr_) {}
1.214 +};
1.215 +
1.216 +#if defined(__BORLANDC__) || (defined(__MWERKS__) && (__MWERKS__ <= 0x3002))
1.217 +
1.218 +///////////////////////////////////////////////////////////////////////////////
1.219 +//
1.220 +// The following specializations are needed because Borland and CodeWarrior
1.221 +// does not accept default template arguments in nested template classes in
1.222 +// classes (i.e functor_action::result)
1.223 +//
1.224 +///////////////////////////////////////////////////////////////////////////////
1.225 +template <typename FuncT, typename TupleT>
1.226 +struct composite0_result<functor_action<FuncT>, TupleT> {
1.227 +
1.228 + typedef typename FuncT::result_type type;
1.229 +};
1.230 +
1.231 +//////////////////////////////////
1.232 +template <typename FuncT, typename TupleT,
1.233 + typename A>
1.234 +struct composite1_result<functor_action<FuncT>, TupleT, A> {
1.235 +
1.236 + typedef typename FuncT::result_type type;
1.237 +};
1.238 +
1.239 +//////////////////////////////////
1.240 +template <typename FuncT, typename TupleT,
1.241 + typename A, typename B>
1.242 +struct composite2_result<functor_action<FuncT>, TupleT, A, B> {
1.243 +
1.244 + typedef typename FuncT::result_type type;
1.245 +};
1.246 +
1.247 +//////////////////////////////////
1.248 +template <typename FuncT, typename TupleT,
1.249 + typename A, typename B, typename C>
1.250 +struct composite3_result<functor_action<FuncT>, TupleT, A, B, C> {
1.251 +
1.252 + typedef typename FuncT::result_type type;
1.253 +};
1.254 +
1.255 +#if PHOENIX_LIMIT > 3
1.256 +//////////////////////////////////
1.257 +template <typename FuncT, typename TupleT,
1.258 + typename A, typename B, typename C, typename D>
1.259 +struct composite4_result<functor_action<FuncT>, TupleT,
1.260 + A, B, C, D> {
1.261 +
1.262 + typedef typename FuncT::result_type type;
1.263 +};
1.264 +
1.265 +//////////////////////////////////
1.266 +template <typename FuncT, typename TupleT,
1.267 + typename A, typename B, typename C, typename D, typename E>
1.268 +struct composite5_result<functor_action<FuncT>, TupleT,
1.269 + A, B, C, D, E> {
1.270 +
1.271 + typedef typename FuncT::result_type type;
1.272 +};
1.273 +
1.274 +//////////////////////////////////
1.275 +template <typename FuncT, typename TupleT,
1.276 + typename A, typename B, typename C, typename D, typename E,
1.277 + typename F>
1.278 +struct composite6_result<functor_action<FuncT>, TupleT,
1.279 + A, B, C, D, E, F> {
1.280 +
1.281 + typedef typename FuncT::result_type type;
1.282 +};
1.283 +
1.284 +#if PHOENIX_LIMIT > 6
1.285 +//////////////////////////////////
1.286 +template <typename FuncT, typename TupleT,
1.287 + typename A, typename B, typename C, typename D, typename E,
1.288 + typename F, typename G>
1.289 +struct composite7_result<functor_action<FuncT>, TupleT,
1.290 + A, B, C, D, E, F, G> {
1.291 +
1.292 + typedef typename FuncT::result_type type;
1.293 +};
1.294 +
1.295 +//////////////////////////////////
1.296 +template <typename FuncT, typename TupleT,
1.297 + typename A, typename B, typename C, typename D, typename E,
1.298 + typename F, typename G, typename H>
1.299 +struct composite8_result<functor_action<FuncT>, TupleT,
1.300 + A, B, C, D, E, F, G, H> {
1.301 +
1.302 + typedef typename FuncT::result_type type;
1.303 +};
1.304 +
1.305 +//////////////////////////////////
1.306 +template <typename FuncT, typename TupleT,
1.307 + typename A, typename B, typename C, typename D, typename E,
1.308 + typename F, typename G, typename H, typename I>
1.309 +struct composite9_result<functor_action<FuncT>, TupleT,
1.310 + A, B, C, D, E, F, G, H, I> {
1.311 +
1.312 + typedef typename FuncT::result_type type;
1.313 +};
1.314 +
1.315 +#if PHOENIX_LIMIT > 9
1.316 +//////////////////////////////////
1.317 +template <typename FuncT, typename TupleT,
1.318 + typename A, typename B, typename C, typename D, typename E,
1.319 + typename F, typename G, typename H, typename I, typename J>
1.320 +struct composite10_result<functor_action<FuncT>, TupleT,
1.321 + A, B, C, D, E, F, G, H, I, J> {
1.322 +
1.323 + typedef typename FuncT::result_type type;
1.324 +};
1.325 +
1.326 +//////////////////////////////////
1.327 +template <typename FuncT, typename TupleT,
1.328 + typename A, typename B, typename C, typename D, typename E,
1.329 + typename F, typename G, typename H, typename I, typename J,
1.330 + typename K>
1.331 +struct composite11_result<functor_action<FuncT>, TupleT,
1.332 + A, B, C, D, E, F, G, H, I, J, K> {
1.333 +
1.334 + typedef typename FuncT::result_type type;
1.335 +};
1.336 +
1.337 +//////////////////////////////////
1.338 +template <typename FuncT, typename TupleT,
1.339 + typename A, typename B, typename C, typename D, typename E,
1.340 + typename F, typename G, typename H, typename I, typename J,
1.341 + typename K, typename L>
1.342 +struct composite12_result<functor_action<FuncT>, TupleT,
1.343 + A, B, C, D, E, F, G, H, I, J, K, L> {
1.344 +
1.345 + typedef typename FuncT::result_type type;
1.346 +};
1.347 +
1.348 +#if PHOENIX_LIMIT > 12
1.349 +//////////////////////////////////
1.350 +template <typename FuncT, typename TupleT,
1.351 + typename A, typename B, typename C, typename D, typename E,
1.352 + typename F, typename G, typename H, typename I, typename J,
1.353 + typename K, typename L, typename M>
1.354 +struct composite13_result<functor_action<FuncT>, TupleT,
1.355 + A, B, C, D, E, F, G, H, I, J, K, L, M> {
1.356 +
1.357 + typedef typename FuncT::result_type type;
1.358 +};
1.359 +
1.360 +//////////////////////////////////
1.361 +template <typename FuncT, typename TupleT,
1.362 + typename A, typename B, typename C, typename D, typename E,
1.363 + typename F, typename G, typename H, typename I, typename J,
1.364 + typename K, typename L, typename M, typename N>
1.365 +struct composite14_result<functor_action<FuncT>, TupleT,
1.366 + A, B, C, D, E, F, G, H, I, J, K, L, M, N> {
1.367 +
1.368 + typedef typename FuncT::result_type type;
1.369 +};
1.370 +
1.371 +//////////////////////////////////
1.372 +template <typename FuncT, typename TupleT,
1.373 + typename A, typename B, typename C, typename D, typename E,
1.374 + typename F, typename G, typename H, typename I, typename J,
1.375 + typename K, typename L, typename M, typename N, typename O>
1.376 +struct composite15_result<functor_action<FuncT>, TupleT,
1.377 + A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> {
1.378 +
1.379 + typedef typename FuncT::result_type type;
1.380 +};
1.381 +
1.382 +#endif
1.383 +#endif
1.384 +#endif
1.385 +#endif
1.386 +#endif
1.387 +
1.388 +//////////////////////////////////
1.389 +template <typename FuncT>
1.390 +struct functor : public function<functor_action<FuncT> > {
1.391 +
1.392 + functor(FuncT func)
1.393 + : function<functor_action<FuncT> >(functor_action<FuncT>(func)) {};
1.394 +};
1.395 +
1.396 +//////////////////////////////////
1.397 +template <typename FuncT>
1.398 +inline functor<FuncT>
1.399 +bind(FuncT func)
1.400 +{
1.401 + return functor<FuncT>(func);
1.402 +}
1.403 +
1.404 +///////////////////////////////////////////////////////////////////////////////
1.405 +//
1.406 +// Member variable pointer binder
1.407 +//
1.408 +///////////////////////////////////////////////////////////////////////////////
1.409 +namespace impl {
1.410 +
1.411 + //////////////////////////////////
1.412 + template <typename T>
1.413 + struct as_ptr {
1.414 +
1.415 + typedef T* pointer_type;
1.416 +
1.417 + static T* get(T& ref)
1.418 + { return &ref; }
1.419 + };
1.420 +
1.421 + //////////////////////////////////
1.422 + template <typename T>
1.423 + struct as_ptr<T*> {
1.424 +
1.425 + typedef T* pointer_type;
1.426 +
1.427 + static T* get(T* ptr)
1.428 + { return ptr; }
1.429 + };
1.430 +}
1.431 +
1.432 +//////////////////////////////////
1.433 +template <typename ActionT, typename ClassT>
1.434 +struct member_var_ptr_action_result {
1.435 +
1.436 + typedef typename ActionT::template result<ClassT>::type type;
1.437 +};
1.438 +
1.439 +//////////////////////////////////
1.440 +template <typename T, typename ClassT>
1.441 +struct member_var_ptr_action {
1.442 +
1.443 + typedef member_var_ptr_action<T, ClassT> self_t;
1.444 +
1.445 + template <typename CT>
1.446 + struct result {
1.447 + typedef typename boost::mpl::if_<boost::is_const<CT>, T const&, T&
1.448 + >::type type;
1.449 + };
1.450 +
1.451 + typedef T ClassT::*mem_var_ptr_t;
1.452 +
1.453 + member_var_ptr_action(mem_var_ptr_t ptr_)
1.454 + : ptr(ptr_) {}
1.455 +
1.456 + template <typename CT>
1.457 + typename member_var_ptr_action_result<self_t, CT>::type
1.458 + operator()(CT& obj) const
1.459 + { return impl::as_ptr<CT>::get(obj)->*ptr; }
1.460 +
1.461 + mem_var_ptr_t ptr;
1.462 +};
1.463 +
1.464 +//////////////////////////////////
1.465 +template <typename T, typename ClassT>
1.466 +struct member_var_ptr
1.467 +: public function<member_var_ptr_action<T, ClassT> > {
1.468 +
1.469 + member_var_ptr(T ClassT::*mp)
1.470 + : function<member_var_ptr_action<T, ClassT> >
1.471 + (member_var_ptr_action<T, ClassT>(mp)) {}
1.472 +};
1.473 +
1.474 +//////////////////////////////////
1.475 +template <typename T, typename ClassT>
1.476 +inline member_var_ptr<T, ClassT>
1.477 +bind(T ClassT::*mp)
1.478 +{
1.479 + return member_var_ptr<T, ClassT>(mp);
1.480 +}
1.481 +
1.482 +///////////////////////////////////////////////////////////////////////////////
1.483 +//
1.484 +// Function pointer binder (main class)
1.485 +//
1.486 +///////////////////////////////////////////////////////////////////////////////
1.487 +template <
1.488 + typename RT
1.489 + , typename A = nil_t
1.490 + , typename B = nil_t
1.491 + , typename C = nil_t
1.492 +
1.493 +#if PHOENIX_LIMIT > 3
1.494 + , typename D = nil_t
1.495 + , typename E = nil_t
1.496 + , typename F = nil_t
1.497 +
1.498 +#if PHOENIX_LIMIT > 6
1.499 + , typename G = nil_t
1.500 + , typename H = nil_t
1.501 + , typename I = nil_t
1.502 +
1.503 +#if PHOENIX_LIMIT > 9
1.504 + , typename J = nil_t
1.505 + , typename K = nil_t
1.506 + , typename L = nil_t
1.507 +
1.508 +#if PHOENIX_LIMIT > 12
1.509 + , typename M = nil_t
1.510 + , typename N = nil_t
1.511 + , typename O = nil_t
1.512 +
1.513 +#endif
1.514 +#endif
1.515 +#endif
1.516 +#endif
1.517 +
1.518 + , typename NU = nil_t // Not used
1.519 +>
1.520 +struct function_ptr_action;
1.521 +
1.522 +//////////////////////////////////
1.523 +template <
1.524 + typename RT
1.525 + , typename A = nil_t
1.526 + , typename B = nil_t
1.527 + , typename C = nil_t
1.528 +
1.529 +#if PHOENIX_LIMIT > 3
1.530 + , typename D = nil_t
1.531 + , typename E = nil_t
1.532 + , typename F = nil_t
1.533 +
1.534 +#if PHOENIX_LIMIT > 6
1.535 + , typename G = nil_t
1.536 + , typename H = nil_t
1.537 + , typename I = nil_t
1.538 +
1.539 +#if PHOENIX_LIMIT > 9
1.540 + , typename J = nil_t
1.541 + , typename K = nil_t
1.542 + , typename L = nil_t
1.543 +
1.544 +#if PHOENIX_LIMIT > 12
1.545 + , typename M = nil_t
1.546 + , typename N = nil_t
1.547 + , typename O = nil_t
1.548 +
1.549 +#endif
1.550 +#endif
1.551 +#endif
1.552 +#endif
1.553 +>
1.554 +struct function_ptr
1.555 +: public function<function_ptr_action<RT
1.556 + , A, B, C
1.557 +#if PHOENIX_LIMIT > 3
1.558 + , D, E, F
1.559 +#if PHOENIX_LIMIT > 6
1.560 + , G, H, I
1.561 +#if PHOENIX_LIMIT > 9
1.562 + , J, K, L
1.563 +#if PHOENIX_LIMIT > 12
1.564 + , M, N, O
1.565 +#endif
1.566 +#endif
1.567 +#endif
1.568 +#endif
1.569 + > > {
1.570 +
1.571 + typedef function_ptr_action<RT
1.572 + , A, B, C
1.573 +#if PHOENIX_LIMIT > 3
1.574 + , D, E, F
1.575 +#if PHOENIX_LIMIT > 6
1.576 + , G, H, I
1.577 +#if PHOENIX_LIMIT > 9
1.578 + , J, K, L
1.579 +#if PHOENIX_LIMIT > 12
1.580 + , M, N, O
1.581 +#endif
1.582 +#endif
1.583 +#endif
1.584 +#endif
1.585 + > action_t;
1.586 +
1.587 + template <typename FPT>
1.588 + function_ptr(FPT fp)
1.589 + : function<action_t>(action_t(fp)) {}
1.590 +};
1.591 +
1.592 +///////////////////////////////////////////////////////////////////////////////
1.593 +//
1.594 +// Function pointer binder (specialization for 0 arg)
1.595 +//
1.596 +///////////////////////////////////////////////////////////////////////////////
1.597 +template <typename RT>
1.598 +struct function_ptr_action<RT,
1.599 + nil_t, nil_t, nil_t,
1.600 +#if PHOENIX_LIMIT > 3
1.601 + nil_t, nil_t, nil_t,
1.602 +#if PHOENIX_LIMIT > 6
1.603 + nil_t, nil_t, nil_t,
1.604 +#if PHOENIX_LIMIT > 9
1.605 + nil_t, nil_t, nil_t,
1.606 +#if PHOENIX_LIMIT > 12
1.607 + nil_t, nil_t, nil_t,
1.608 +#endif
1.609 +#endif
1.610 +#endif
1.611 +#endif
1.612 + nil_t // Unused
1.613 +> {
1.614 +
1.615 + typedef RT result_type;
1.616 + typedef RT(*func_ptr_t)();
1.617 +
1.618 + function_ptr_action(func_ptr_t fptr_)
1.619 + : fptr(fptr_) {}
1.620 +
1.621 + result_type operator()() const
1.622 + { return fptr(); }
1.623 +
1.624 + func_ptr_t fptr;
1.625 +};
1.626 +
1.627 +//////////////////////////////////
1.628 +template <typename RT>
1.629 +inline function_ptr<RT>
1.630 +bind(RT(*fptr)())
1.631 +{
1.632 + return function_ptr<RT>(fptr);
1.633 +}
1.634 +
1.635 +///////////////////////////////////////////////////////////////////////////////
1.636 +//
1.637 +// Function pointer binder (specialization for 1 arg)
1.638 +//
1.639 +///////////////////////////////////////////////////////////////////////////////
1.640 +template <typename RT, typename A>
1.641 +struct function_ptr_action<RT,
1.642 + A, nil_t, nil_t,
1.643 +#if PHOENIX_LIMIT > 3
1.644 + nil_t, nil_t, nil_t,
1.645 +#if PHOENIX_LIMIT > 6
1.646 + nil_t, nil_t, nil_t,
1.647 +#if PHOENIX_LIMIT > 9
1.648 + nil_t, nil_t, nil_t,
1.649 +#if PHOENIX_LIMIT > 12
1.650 + nil_t, nil_t, nil_t,
1.651 +#endif
1.652 +#endif
1.653 +#endif
1.654 +#endif
1.655 + nil_t // Unused
1.656 +> {
1.657 +
1.658 + typedef RT result_type;
1.659 + typedef RT(*func_ptr_t)(A);
1.660 +
1.661 + template <typename A_>
1.662 + struct result { typedef result_type type; };
1.663 +
1.664 + function_ptr_action(func_ptr_t fptr_)
1.665 + : fptr(fptr_) {}
1.666 +
1.667 + result_type operator()(A a) const
1.668 + { return fptr(a); }
1.669 +
1.670 + func_ptr_t fptr;
1.671 +};
1.672 +
1.673 +//////////////////////////////////
1.674 +template <typename RT, typename A>
1.675 +inline function_ptr<RT, A>
1.676 +bind(RT(*fptr)(A))
1.677 +{
1.678 + return function_ptr<RT, A>(fptr);
1.679 +}
1.680 +
1.681 +///////////////////////////////////////////////////////////////////////////////
1.682 +//
1.683 +// Function pointer binder (specialization for 2 args)
1.684 +//
1.685 +///////////////////////////////////////////////////////////////////////////////
1.686 +template <typename RT, typename A, typename B>
1.687 +struct function_ptr_action<RT,
1.688 + A, B, nil_t,
1.689 +#if PHOENIX_LIMIT > 3
1.690 + nil_t, nil_t, nil_t,
1.691 +#if PHOENIX_LIMIT > 6
1.692 + nil_t, nil_t, nil_t,
1.693 +#if PHOENIX_LIMIT > 9
1.694 + nil_t, nil_t, nil_t,
1.695 +#if PHOENIX_LIMIT > 12
1.696 + nil_t, nil_t, nil_t,
1.697 +#endif
1.698 +#endif
1.699 +#endif
1.700 +#endif
1.701 + nil_t // Unused
1.702 +> {
1.703 +
1.704 + typedef RT result_type;
1.705 + typedef RT(*func_ptr_t)(A, B);
1.706 +
1.707 + template <typename A_, typename B_>
1.708 + struct result { typedef result_type type; };
1.709 +
1.710 + function_ptr_action(func_ptr_t fptr_)
1.711 + : fptr(fptr_) {}
1.712 +
1.713 + result_type operator()(A a, B b) const
1.714 + { return fptr(a, b); }
1.715 +
1.716 + func_ptr_t fptr;
1.717 +};
1.718 +
1.719 +//////////////////////////////////
1.720 +template <typename RT, typename A, typename B>
1.721 +inline function_ptr<RT, A, B>
1.722 +bind(RT(*fptr)(A, B))
1.723 +{
1.724 + return function_ptr<RT, A, B>(fptr);
1.725 +}
1.726 +
1.727 +///////////////////////////////////////////////////////////////////////////////
1.728 +//
1.729 +// Function pointer binder (specialization for 3 args)
1.730 +//
1.731 +///////////////////////////////////////////////////////////////////////////////
1.732 +template <typename RT, typename A, typename B, typename C>
1.733 +struct function_ptr_action<RT,
1.734 + A, B, C,
1.735 +#if PHOENIX_LIMIT > 3
1.736 + nil_t, nil_t, nil_t,
1.737 +#if PHOENIX_LIMIT > 6
1.738 + nil_t, nil_t, nil_t,
1.739 +#if PHOENIX_LIMIT > 9
1.740 + nil_t, nil_t, nil_t,
1.741 +#if PHOENIX_LIMIT > 12
1.742 + nil_t, nil_t, nil_t,
1.743 +#endif
1.744 +#endif
1.745 +#endif
1.746 +#endif
1.747 + nil_t // Unused
1.748 +> {
1.749 +
1.750 + typedef RT result_type;
1.751 + typedef RT(*func_ptr_t)(A, B, C);
1.752 +
1.753 + template <typename A_, typename B_, typename C_>
1.754 + struct result { typedef result_type type; };
1.755 +
1.756 + function_ptr_action(func_ptr_t fptr_)
1.757 + : fptr(fptr_) {}
1.758 +
1.759 + result_type operator()(A a, B b, C c) const
1.760 + { return fptr(a, b, c); }
1.761 +
1.762 + func_ptr_t fptr;
1.763 +};
1.764 +
1.765 +//////////////////////////////////
1.766 +template <typename RT, typename A, typename B, typename C>
1.767 +inline function_ptr<RT, A, B, C>
1.768 +bind(RT(*fptr)(A, B, C))
1.769 +{
1.770 + return function_ptr<RT, A, B, C>(fptr);
1.771 +}
1.772 +
1.773 +#if PHOENIX_LIMIT > 3
1.774 +///////////////////////////////////////////////////////////////////////////////
1.775 +//
1.776 +// Function pointer binder (specialization for 4 args)
1.777 +//
1.778 +///////////////////////////////////////////////////////////////////////////////
1.779 +template <typename RT, typename A, typename B, typename C, typename D>
1.780 +struct function_ptr_action<RT,
1.781 + A, B, C, D, nil_t, nil_t,
1.782 +#if PHOENIX_LIMIT > 6
1.783 + nil_t, nil_t, nil_t,
1.784 +#if PHOENIX_LIMIT > 9
1.785 + nil_t, nil_t, nil_t,
1.786 +#if PHOENIX_LIMIT > 12
1.787 + nil_t, nil_t, nil_t,
1.788 +#endif
1.789 +#endif
1.790 +#endif
1.791 + nil_t // Unused
1.792 +> {
1.793 +
1.794 + typedef RT result_type;
1.795 + typedef RT(*func_ptr_t)(A, B, C, D);
1.796 +
1.797 + template <typename A_, typename B_, typename C_, typename D_>
1.798 + struct result { typedef result_type type; };
1.799 +
1.800 + function_ptr_action(func_ptr_t fptr_)
1.801 + : fptr(fptr_) {}
1.802 +
1.803 + result_type operator()(A a, B b, C c, D d) const
1.804 + { return fptr(a, b, c, d); }
1.805 +
1.806 + func_ptr_t fptr;
1.807 +};
1.808 +
1.809 +//////////////////////////////////
1.810 +template <typename RT, typename A, typename B, typename C, typename D>
1.811 +inline function_ptr<RT, A, B, C, D>
1.812 +bind(RT(*fptr)(A, B, C, D))
1.813 +{
1.814 + return function_ptr<RT, A, B, C, D>(fptr);
1.815 +}
1.816 +
1.817 +///////////////////////////////////////////////////////////////////////////////
1.818 +//
1.819 +// Function pointer binder (specialization for 5 args)
1.820 +//
1.821 +///////////////////////////////////////////////////////////////////////////////
1.822 +template <typename RT,
1.823 + typename A, typename B, typename C, typename D, typename E
1.824 +>
1.825 +struct function_ptr_action<RT,
1.826 + A, B, C, D, E, nil_t,
1.827 +#if PHOENIX_LIMIT > 6
1.828 + nil_t, nil_t, nil_t,
1.829 +#if PHOENIX_LIMIT > 9
1.830 + nil_t, nil_t, nil_t,
1.831 +#if PHOENIX_LIMIT > 12
1.832 + nil_t, nil_t, nil_t,
1.833 +#endif
1.834 +#endif
1.835 +#endif
1.836 + nil_t // Unused
1.837 +> {
1.838 +
1.839 + typedef RT result_type;
1.840 + typedef RT(*func_ptr_t)(A, B, C, D, E);
1.841 +
1.842 + template <
1.843 + typename A_, typename B_, typename C_, typename D_, typename E_
1.844 + >
1.845 + struct result { typedef result_type type; };
1.846 +
1.847 + function_ptr_action(func_ptr_t fptr_)
1.848 + : fptr(fptr_) {}
1.849 +
1.850 + result_type operator()(
1.851 + A a, B b, C c, D d, E e
1.852 + ) const
1.853 + { return fptr(a, b, c, d, e); }
1.854 +
1.855 + func_ptr_t fptr;
1.856 +};
1.857 +
1.858 +//////////////////////////////////
1.859 +template <typename RT,
1.860 + typename A, typename B, typename C, typename D, typename E
1.861 +>
1.862 +inline function_ptr<RT, A, B, C, D, E>
1.863 +bind(RT(*fptr)(A, B, C, D, E))
1.864 +{
1.865 + return function_ptr<RT, A, B, C, D, E>(fptr);
1.866 +}
1.867 +
1.868 +///////////////////////////////////////////////////////////////////////////////
1.869 +//
1.870 +// Function pointer binder (specialization for 6 args)
1.871 +//
1.872 +///////////////////////////////////////////////////////////////////////////////
1.873 +template <typename RT,
1.874 + typename A, typename B, typename C, typename D, typename E,
1.875 + typename F
1.876 +>
1.877 +struct function_ptr_action<RT,
1.878 + A, B, C, D, E, F,
1.879 +#if PHOENIX_LIMIT > 6
1.880 + nil_t, nil_t, nil_t,
1.881 +#if PHOENIX_LIMIT > 9
1.882 + nil_t, nil_t, nil_t,
1.883 +#if PHOENIX_LIMIT > 12
1.884 + nil_t, nil_t, nil_t,
1.885 +#endif
1.886 +#endif
1.887 +#endif
1.888 + nil_t // Unused
1.889 +> {
1.890 +
1.891 + typedef RT result_type;
1.892 + typedef RT(*func_ptr_t)(A, B, C, D, E, F);
1.893 +
1.894 + template <
1.895 + typename A_, typename B_, typename C_, typename D_, typename E_,
1.896 + typename F_
1.897 + >
1.898 + struct result { typedef result_type type; };
1.899 +
1.900 + function_ptr_action(func_ptr_t fptr_)
1.901 + : fptr(fptr_) {}
1.902 +
1.903 + result_type operator()(
1.904 + A a, B b, C c, D d, E e,
1.905 + F f
1.906 + ) const
1.907 + { return fptr(a, b, c, d, e, f); }
1.908 +
1.909 + func_ptr_t fptr;
1.910 +};
1.911 +
1.912 +//////////////////////////////////
1.913 +template <typename RT,
1.914 + typename A, typename B, typename C, typename D, typename E,
1.915 + typename F
1.916 +>
1.917 +inline function_ptr<RT, A, B, C, D, E, F>
1.918 +bind(RT(*fptr)(A, B, C, D, E, F))
1.919 +{
1.920 + return function_ptr<RT, A, B, C, D, E, F>(fptr);
1.921 +}
1.922 +
1.923 +#if PHOENIX_LIMIT > 6
1.924 +///////////////////////////////////////////////////////////////////////////////
1.925 +//
1.926 +// Function pointer binder (specialization for 7 args)
1.927 +//
1.928 +///////////////////////////////////////////////////////////////////////////////
1.929 +template <typename RT,
1.930 + typename A, typename B, typename C, typename D, typename E,
1.931 + typename F, typename G
1.932 +>
1.933 +struct function_ptr_action<RT,
1.934 + A, B, C, D, E, F, G, nil_t, nil_t,
1.935 +#if PHOENIX_LIMIT > 9
1.936 + nil_t, nil_t, nil_t,
1.937 +#if PHOENIX_LIMIT > 12
1.938 + nil_t, nil_t, nil_t,
1.939 +#endif
1.940 +#endif
1.941 + nil_t // Unused
1.942 +> {
1.943 +
1.944 + typedef RT result_type;
1.945 + typedef RT(*func_ptr_t)(A, B, C, D, E, F, G);
1.946 +
1.947 + template <
1.948 + typename A_, typename B_, typename C_, typename D_, typename E_,
1.949 + typename F_, typename G_
1.950 + >
1.951 + struct result { typedef result_type type; };
1.952 +
1.953 + function_ptr_action(func_ptr_t fptr_)
1.954 + : fptr(fptr_) {}
1.955 +
1.956 + result_type operator()(
1.957 + A a, B b, C c, D d, E e,
1.958 + F f, G g
1.959 + ) const
1.960 + { return fptr(a, b, c, d, e, f, g); }
1.961 +
1.962 + func_ptr_t fptr;
1.963 +};
1.964 +
1.965 +//////////////////////////////////
1.966 +template <typename RT,
1.967 + typename A, typename B, typename C, typename D, typename E,
1.968 + typename F, typename G
1.969 +>
1.970 +inline function_ptr<RT, A, B, C, D, E, F, G>
1.971 +bind(RT(*fptr)(A, B, C, D, E, F, G))
1.972 +{
1.973 + return function_ptr<RT, A, B, C, D, E, F, G>(fptr);
1.974 +}
1.975 +
1.976 +///////////////////////////////////////////////////////////////////////////////
1.977 +//
1.978 +// Function pointer binder (specialization for 8 args)
1.979 +//
1.980 +///////////////////////////////////////////////////////////////////////////////
1.981 +template <typename RT,
1.982 + typename A, typename B, typename C, typename D, typename E,
1.983 + typename F, typename G, typename H
1.984 +>
1.985 +struct function_ptr_action<RT,
1.986 + A, B, C, D, E, F, G, H, nil_t,
1.987 +#if PHOENIX_LIMIT > 9
1.988 + nil_t, nil_t, nil_t,
1.989 +#if PHOENIX_LIMIT > 12
1.990 + nil_t, nil_t, nil_t,
1.991 +#endif
1.992 +#endif
1.993 + nil_t // Unused
1.994 +> {
1.995 +
1.996 + typedef RT result_type;
1.997 + typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H);
1.998 +
1.999 + template <
1.1000 + typename A_, typename B_, typename C_, typename D_, typename E_,
1.1001 + typename F_, typename G_, typename H_
1.1002 + >
1.1003 + struct result { typedef result_type type; };
1.1004 +
1.1005 + function_ptr_action(func_ptr_t fptr_)
1.1006 + : fptr(fptr_) {}
1.1007 +
1.1008 + result_type operator()(
1.1009 + A a, B b, C c, D d, E e,
1.1010 + F f, G g, H h
1.1011 + ) const
1.1012 + { return fptr(a, b, c, d, e, f, g, h); }
1.1013 +
1.1014 + func_ptr_t fptr;
1.1015 +};
1.1016 +
1.1017 +//////////////////////////////////
1.1018 +template <typename RT,
1.1019 + typename A, typename B, typename C, typename D, typename E,
1.1020 + typename F, typename G, typename H
1.1021 +>
1.1022 +inline function_ptr<RT, A, B, C, D, E, F, G, H>
1.1023 +bind(RT(*fptr)(A, B, C, D, E, F, G, H))
1.1024 +{
1.1025 + return function_ptr<RT, A, B, C, D, E, F, G, H>(fptr);
1.1026 +}
1.1027 +
1.1028 +///////////////////////////////////////////////////////////////////////////////
1.1029 +//
1.1030 +// Function pointer binder (specialization for 9 args)
1.1031 +//
1.1032 +///////////////////////////////////////////////////////////////////////////////
1.1033 +template <typename RT,
1.1034 + typename A, typename B, typename C, typename D, typename E,
1.1035 + typename F, typename G, typename H, typename I
1.1036 +>
1.1037 +struct function_ptr_action<RT,
1.1038 + A, B, C, D, E, F, G, H, I,
1.1039 +#if PHOENIX_LIMIT > 9
1.1040 + nil_t, nil_t, nil_t,
1.1041 +#if PHOENIX_LIMIT > 12
1.1042 + nil_t, nil_t, nil_t,
1.1043 +#endif
1.1044 +#endif
1.1045 + nil_t // Unused
1.1046 +> {
1.1047 +
1.1048 + typedef RT result_type;
1.1049 + typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I);
1.1050 +
1.1051 + template <
1.1052 + typename A_, typename B_, typename C_, typename D_, typename E_,
1.1053 + typename F_, typename G_, typename H_, typename I_
1.1054 + >
1.1055 + struct result { typedef result_type type; };
1.1056 +
1.1057 + function_ptr_action(func_ptr_t fptr_)
1.1058 + : fptr(fptr_) {}
1.1059 +
1.1060 + result_type operator()(
1.1061 + A a, B b, C c, D d, E e,
1.1062 + F f, G g, H h, I i
1.1063 + ) const
1.1064 + { return fptr(a, b, c, d, e, f, g, h, i); }
1.1065 +
1.1066 + func_ptr_t fptr;
1.1067 +};
1.1068 +
1.1069 +//////////////////////////////////
1.1070 +template <typename RT,
1.1071 + typename A, typename B, typename C, typename D, typename E,
1.1072 + typename F, typename G, typename H, typename I
1.1073 +>
1.1074 +inline function_ptr<RT, A, B, C, D, E, F, G, H, I>
1.1075 +bind(RT(*fptr)(A, B, C, D, E, F, G, H, I))
1.1076 +{
1.1077 + return function_ptr<RT, A, B, C, D, E, F, G, H, I>(fptr);
1.1078 +}
1.1079 +
1.1080 +#if PHOENIX_LIMIT > 9
1.1081 +///////////////////////////////////////////////////////////////////////////////
1.1082 +//
1.1083 +// Function pointer binder (specialization for 10 args)
1.1084 +//
1.1085 +///////////////////////////////////////////////////////////////////////////////
1.1086 +template <typename RT,
1.1087 + typename A, typename B, typename C, typename D, typename E,
1.1088 + typename F, typename G, typename H, typename I, typename J
1.1089 +>
1.1090 +struct function_ptr_action<RT,
1.1091 + A, B, C, D, E, F, G, H, I, J, nil_t, nil_t,
1.1092 +#if PHOENIX_LIMIT > 12
1.1093 + nil_t, nil_t, nil_t,
1.1094 +#endif
1.1095 + nil_t // Unused
1.1096 +> {
1.1097 +
1.1098 + typedef RT result_type;
1.1099 + typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I, J);
1.1100 +
1.1101 + template <
1.1102 + typename A_, typename B_, typename C_, typename D_, typename E_,
1.1103 + typename F_, typename G_, typename H_, typename I_, typename J_
1.1104 + >
1.1105 + struct result { typedef result_type type; };
1.1106 +
1.1107 + function_ptr_action(func_ptr_t fptr_)
1.1108 + : fptr(fptr_) {}
1.1109 +
1.1110 + result_type operator()(
1.1111 + A a, B b, C c, D d, E e,
1.1112 + F f, G g, H h, I i, J j
1.1113 + ) const
1.1114 + { return fptr(a, b, c, d, e, f, g, h, i, j); }
1.1115 +
1.1116 + func_ptr_t fptr;
1.1117 +};
1.1118 +
1.1119 +//////////////////////////////////
1.1120 +template <typename RT,
1.1121 + typename A, typename B, typename C, typename D, typename E,
1.1122 + typename F, typename G, typename H, typename I, typename J
1.1123 +>
1.1124 +inline function_ptr<RT, A, B, C, D, E, F, G, H, I, J>
1.1125 +bind(RT(*fptr)(A, B, C, D, E, F, G, H, I, J))
1.1126 +{
1.1127 + return function_ptr<RT, A, B, C, D, E, F, G, H, I, J>(fptr);
1.1128 +}
1.1129 +
1.1130 +///////////////////////////////////////////////////////////////////////////////
1.1131 +//
1.1132 +// Function pointer binder (specialization for 11 args)
1.1133 +//
1.1134 +///////////////////////////////////////////////////////////////////////////////
1.1135 +template <typename RT,
1.1136 + typename A, typename B, typename C, typename D, typename E,
1.1137 + typename F, typename G, typename H, typename I, typename J,
1.1138 + typename K
1.1139 +>
1.1140 +struct function_ptr_action<RT,
1.1141 + A, B, C, D, E, F, G, H, I, J, K, nil_t,
1.1142 +#if PHOENIX_LIMIT > 12
1.1143 + nil_t, nil_t, nil_t,
1.1144 +#endif
1.1145 + nil_t // Unused
1.1146 +> {
1.1147 +
1.1148 + typedef RT result_type;
1.1149 + typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I, J, K);
1.1150 +
1.1151 + template <
1.1152 + typename A_, typename B_, typename C_, typename D_, typename E_,
1.1153 + typename F_, typename G_, typename H_, typename I_, typename J_,
1.1154 + typename K_
1.1155 + >
1.1156 + struct result { typedef result_type type; };
1.1157 +
1.1158 + function_ptr_action(func_ptr_t fptr_)
1.1159 + : fptr(fptr_) {}
1.1160 +
1.1161 + result_type operator()(
1.1162 + A a, B b, C c, D d, E e,
1.1163 + F f, G g, H h, I i, J j,
1.1164 + K k
1.1165 + ) const
1.1166 + { return fptr(a, b, c, d, e, f, g, h, i, j, k); }
1.1167 +
1.1168 + func_ptr_t fptr;
1.1169 +};
1.1170 +
1.1171 +//////////////////////////////////
1.1172 +template <typename RT,
1.1173 + typename A, typename B, typename C, typename D, typename E,
1.1174 + typename F, typename G, typename H, typename I, typename J,
1.1175 + typename K
1.1176 +>
1.1177 +inline function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K>
1.1178 +bind(RT(*fptr)(A, B, C, D, E, F, G, H, I, J, K))
1.1179 +{
1.1180 + return function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K>(fptr);
1.1181 +}
1.1182 +
1.1183 +///////////////////////////////////////////////////////////////////////////////
1.1184 +//
1.1185 +// Function pointer binder (specialization for 12 args)
1.1186 +//
1.1187 +///////////////////////////////////////////////////////////////////////////////
1.1188 +template <typename RT,
1.1189 + typename A, typename B, typename C, typename D, typename E,
1.1190 + typename F, typename G, typename H, typename I, typename J,
1.1191 + typename K, typename L
1.1192 +>
1.1193 +struct function_ptr_action<RT,
1.1194 + A, B, C, D, E, F, G, H, I, J, K, L,
1.1195 +#if PHOENIX_LIMIT > 12
1.1196 + nil_t, nil_t, nil_t,
1.1197 +#endif
1.1198 + nil_t // Unused
1.1199 +> {
1.1200 +
1.1201 + typedef RT result_type;
1.1202 + typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I, J, K, L);
1.1203 +
1.1204 + template <
1.1205 + typename A_, typename B_, typename C_, typename D_, typename E_,
1.1206 + typename F_, typename G_, typename H_, typename I_, typename J_,
1.1207 + typename K_, typename L_
1.1208 + >
1.1209 + struct result { typedef result_type type; };
1.1210 +
1.1211 + function_ptr_action(func_ptr_t fptr_)
1.1212 + : fptr(fptr_) {}
1.1213 +
1.1214 + result_type operator()(
1.1215 + A a, B b, C c, D d, E e,
1.1216 + F f, G g, H h, I i, J j,
1.1217 + K k, L l
1.1218 + ) const
1.1219 + { return fptr(a, b, c, d, e, f, g, h, i, j, k, l); }
1.1220 +
1.1221 + func_ptr_t fptr;
1.1222 +};
1.1223 +
1.1224 +//////////////////////////////////
1.1225 +template <typename RT,
1.1226 + typename A, typename B, typename C, typename D, typename E,
1.1227 + typename F, typename G, typename H, typename I, typename J,
1.1228 + typename K, typename L
1.1229 +>
1.1230 +inline function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L>
1.1231 +bind(RT(*fptr)(A, B, C, D, E, F, G, H, I, J, K, L))
1.1232 +{
1.1233 + return function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L>(fptr);
1.1234 +}
1.1235 +
1.1236 +#if PHOENIX_LIMIT > 12
1.1237 +///////////////////////////////////////////////////////////////////////////////
1.1238 +//
1.1239 +// Function pointer binder (specialization for 13 args)
1.1240 +//
1.1241 +///////////////////////////////////////////////////////////////////////////////
1.1242 +template <typename RT,
1.1243 + typename A, typename B, typename C, typename D, typename E,
1.1244 + typename F, typename G, typename H, typename I, typename J,
1.1245 + typename K, typename L, typename M
1.1246 +>
1.1247 +struct function_ptr_action<RT,
1.1248 + A, B, C, D, E, F, G, H, I, J, K, L, M, nil_t, nil_t, nil_t> {
1.1249 +
1.1250 + typedef RT result_type;
1.1251 + typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I, J, K, L, M);
1.1252 +
1.1253 + template <
1.1254 + typename A_, typename B_, typename C_, typename D_, typename E_,
1.1255 + typename F_, typename G_, typename H_, typename I_, typename J_,
1.1256 + typename K_, typename L_, typename M_
1.1257 + >
1.1258 + struct result { typedef result_type type; };
1.1259 +
1.1260 + function_ptr_action(func_ptr_t fptr_)
1.1261 + : fptr(fptr_) {}
1.1262 +
1.1263 + result_type operator()(
1.1264 + A a, B b, C c, D d, E e,
1.1265 + F f, G g, H h, I i, J j,
1.1266 + K k, L l, M m
1.1267 + ) const
1.1268 + { return fptr(a, b, c, d, e, f, g, h, i, j, k, l, m); }
1.1269 +
1.1270 + func_ptr_t fptr;
1.1271 +};
1.1272 +
1.1273 +//////////////////////////////////
1.1274 +template <typename RT,
1.1275 + typename A, typename B, typename C, typename D, typename E,
1.1276 + typename F, typename G, typename H, typename I, typename J,
1.1277 + typename K, typename L, typename M
1.1278 +>
1.1279 +inline function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L, M>
1.1280 +bind(RT(*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M))
1.1281 +{
1.1282 + return function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L, M>(fptr);
1.1283 +}
1.1284 +
1.1285 +///////////////////////////////////////////////////////////////////////////////
1.1286 +//
1.1287 +// Function pointer binder (specialization for 14 args)
1.1288 +//
1.1289 +///////////////////////////////////////////////////////////////////////////////
1.1290 +template <typename RT,
1.1291 + typename A, typename B, typename C, typename D, typename E,
1.1292 + typename F, typename G, typename H, typename I, typename J,
1.1293 + typename K, typename L, typename M, typename N
1.1294 +>
1.1295 +struct function_ptr_action<RT,
1.1296 + A, B, C, D, E, F, G, H, I, J, K, L, M, N, nil_t, nil_t> {
1.1297 +
1.1298 + typedef RT result_type;
1.1299 + typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I, J, K, L, M, N);
1.1300 +
1.1301 + template <
1.1302 + typename A_, typename B_, typename C_, typename D_, typename E_,
1.1303 + typename F_, typename G_, typename H_, typename I_, typename J_,
1.1304 + typename K_, typename L_, typename M_, typename N_
1.1305 + >
1.1306 + struct result { typedef result_type type; };
1.1307 +
1.1308 + function_ptr_action(func_ptr_t fptr_)
1.1309 + : fptr(fptr_) {}
1.1310 +
1.1311 + result_type operator()(
1.1312 + A a, B b, C c, D d, E e,
1.1313 + F f, G g, H h, I i, J j,
1.1314 + K k, L l, M m, N n
1.1315 + ) const
1.1316 + { return fptr(a, b, c, d, e, f, g, h, i, j, k, l, m, n); }
1.1317 +
1.1318 + func_ptr_t fptr;
1.1319 +};
1.1320 +
1.1321 +//////////////////////////////////
1.1322 +template <typename RT,
1.1323 + typename A, typename B, typename C, typename D, typename E,
1.1324 + typename F, typename G, typename H, typename I, typename J,
1.1325 + typename K, typename L, typename M, typename N
1.1326 +>
1.1327 +inline function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
1.1328 +bind(RT(*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N))
1.1329 +{
1.1330 + return function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(fptr);
1.1331 +}
1.1332 +
1.1333 +///////////////////////////////////////////////////////////////////////////////
1.1334 +//
1.1335 +// Function pointer binder (specialization for 15 args)
1.1336 +//
1.1337 +///////////////////////////////////////////////////////////////////////////////
1.1338 +template <typename RT,
1.1339 + typename A, typename B, typename C, typename D, typename E,
1.1340 + typename F, typename G, typename H, typename I, typename J,
1.1341 + typename K, typename L, typename M, typename N, typename O
1.1342 +>
1.1343 +struct function_ptr_action<RT,
1.1344 + A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, nil_t> {
1.1345 +
1.1346 + typedef RT result_type;
1.1347 + typedef RT(*func_ptr_t)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O);
1.1348 +
1.1349 + template <
1.1350 + typename A_, typename B_, typename C_, typename D_, typename E_,
1.1351 + typename F_, typename G_, typename H_, typename I_, typename J_,
1.1352 + typename K_, typename L_, typename M_, typename N_, typename O_
1.1353 + >
1.1354 + struct result { typedef result_type type; };
1.1355 +
1.1356 + function_ptr_action(func_ptr_t fptr_)
1.1357 + : fptr(fptr_) {}
1.1358 +
1.1359 + result_type operator()(
1.1360 + A a, B b, C c, D d, E e,
1.1361 + F f, G g, H h, I i, J j,
1.1362 + K k, L l, M m, N n, O o
1.1363 + ) const
1.1364 + { return fptr(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); }
1.1365 +
1.1366 + func_ptr_t fptr;
1.1367 +};
1.1368 +
1.1369 +//////////////////////////////////
1.1370 +template <typename RT,
1.1371 + typename A, typename B, typename C, typename D, typename E,
1.1372 + typename F, typename G, typename H, typename I, typename J,
1.1373 + typename K, typename L, typename M, typename N, typename O
1.1374 +>
1.1375 +inline function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
1.1376 +bind(RT(*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O))
1.1377 +{
1.1378 + return function_ptr<RT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(fptr);
1.1379 +}
1.1380 +
1.1381 +#endif
1.1382 +#endif
1.1383 +#endif
1.1384 +#endif
1.1385 +///////////////////////////////////////////////////////////////////////////////
1.1386 +//
1.1387 +// Member function pointer binder (main class)
1.1388 +//
1.1389 +///////////////////////////////////////////////////////////////////////////////
1.1390 +template <
1.1391 + typename RT,
1.1392 + typename ClassT
1.1393 + , typename A = nil_t
1.1394 + , typename B = nil_t
1.1395 + , typename C = nil_t
1.1396 +
1.1397 +#if PHOENIX_LIMIT > 3
1.1398 + , typename D = nil_t
1.1399 + , typename E = nil_t
1.1400 + , typename F = nil_t
1.1401 +
1.1402 +#if PHOENIX_LIMIT > 6
1.1403 + , typename G = nil_t
1.1404 + , typename H = nil_t
1.1405 + , typename I = nil_t
1.1406 +
1.1407 +#if PHOENIX_LIMIT > 9
1.1408 + , typename J = nil_t
1.1409 + , typename K = nil_t
1.1410 + , typename L = nil_t
1.1411 +
1.1412 +#if PHOENIX_LIMIT > 12
1.1413 + , typename M = nil_t
1.1414 + , typename N = nil_t
1.1415 + , typename O = nil_t
1.1416 +
1.1417 +#endif
1.1418 +#endif
1.1419 +#endif
1.1420 +#endif
1.1421 +
1.1422 + , typename NU = nil_t // Not used
1.1423 +>
1.1424 +struct member_function_ptr_action;
1.1425 +
1.1426 +//////////////////////////////////
1.1427 +template <
1.1428 + typename RT,
1.1429 + typename ClassT
1.1430 + , typename A = nil_t
1.1431 + , typename B = nil_t
1.1432 + , typename C = nil_t
1.1433 +
1.1434 +#if PHOENIX_LIMIT > 3
1.1435 + , typename D = nil_t
1.1436 + , typename E = nil_t
1.1437 + , typename F = nil_t
1.1438 +
1.1439 +#if PHOENIX_LIMIT > 6
1.1440 + , typename G = nil_t
1.1441 + , typename H = nil_t
1.1442 + , typename I = nil_t
1.1443 +
1.1444 +#if PHOENIX_LIMIT > 9
1.1445 + , typename J = nil_t
1.1446 + , typename K = nil_t
1.1447 + , typename L = nil_t
1.1448 +
1.1449 +#if PHOENIX_LIMIT > 12
1.1450 + , typename M = nil_t
1.1451 + , typename N = nil_t
1.1452 + , typename O = nil_t
1.1453 +
1.1454 +#endif
1.1455 +#endif
1.1456 +#endif
1.1457 +#endif
1.1458 +>
1.1459 +struct member_function_ptr
1.1460 +: public function<member_function_ptr_action<RT, ClassT
1.1461 + , A, B, C
1.1462 +#if PHOENIX_LIMIT > 3
1.1463 + , D, E, F
1.1464 +#if PHOENIX_LIMIT > 6
1.1465 + , G, H, I
1.1466 +#if PHOENIX_LIMIT > 9
1.1467 + , J, K, L
1.1468 +#if PHOENIX_LIMIT > 12
1.1469 + , M, N, O
1.1470 +#endif
1.1471 +#endif
1.1472 +#endif
1.1473 +#endif
1.1474 + > > {
1.1475 +
1.1476 + typedef member_function_ptr_action<RT, ClassT
1.1477 + , A, B, C
1.1478 +#if PHOENIX_LIMIT > 3
1.1479 + , D, E, F
1.1480 +#if PHOENIX_LIMIT > 6
1.1481 + , G, H, I
1.1482 +#if PHOENIX_LIMIT > 9
1.1483 + , J, K, L
1.1484 +#if PHOENIX_LIMIT > 12
1.1485 + , M, N, O
1.1486 +#endif
1.1487 +#endif
1.1488 +#endif
1.1489 +#endif
1.1490 + > action_t;
1.1491 +
1.1492 + template <typename FPT>
1.1493 + member_function_ptr(FPT fp)
1.1494 + : function<action_t>(action_t(fp)) {}
1.1495 +};
1.1496 +
1.1497 +///////////////////////////////////////////////////////////////////////////////
1.1498 +//
1.1499 +// Member function pointer binder (specialization for 0 arg)
1.1500 +//
1.1501 +///////////////////////////////////////////////////////////////////////////////
1.1502 +template <typename RT, typename ClassT>
1.1503 +struct member_function_ptr_action<RT, ClassT,
1.1504 + nil_t, nil_t, nil_t,
1.1505 +#if PHOENIX_LIMIT > 3
1.1506 + nil_t, nil_t, nil_t,
1.1507 +#if PHOENIX_LIMIT > 6
1.1508 + nil_t, nil_t, nil_t,
1.1509 +#if PHOENIX_LIMIT > 9
1.1510 + nil_t, nil_t, nil_t,
1.1511 +#if PHOENIX_LIMIT > 12
1.1512 + nil_t, nil_t, nil_t,
1.1513 +#endif
1.1514 +#endif
1.1515 +#endif
1.1516 +#endif
1.1517 + nil_t // Unused
1.1518 +> {
1.1519 +
1.1520 + typedef RT result_type;
1.1521 + typedef RT(ClassT::*mf)();
1.1522 + typedef RT(ClassT::*cmf)() const;
1.1523 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.1524 + mem_func_ptr_t;
1.1525 +
1.1526 + template <typename CT>
1.1527 + struct result { typedef result_type type; };
1.1528 +
1.1529 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.1530 + : fptr(fptr_) {}
1.1531 +
1.1532 + template <typename CT>
1.1533 + result_type operator()(CT& obj) const
1.1534 + { return (impl::as_ptr<CT>::get(obj)->*fptr)(); }
1.1535 +
1.1536 + mem_func_ptr_t fptr;
1.1537 +};
1.1538 +
1.1539 +//////////////////////////////////
1.1540 +template <typename RT, typename ClassT>
1.1541 +inline member_function_ptr<RT, ClassT>
1.1542 +bind(RT(ClassT::*fptr)())
1.1543 +{
1.1544 + return member_function_ptr<RT, ClassT>(fptr);
1.1545 +}
1.1546 +
1.1547 +template <typename RT, typename ClassT>
1.1548 +inline member_function_ptr<RT, ClassT const>
1.1549 +bind(RT(ClassT::*fptr)() const)
1.1550 +{
1.1551 + return member_function_ptr<RT, ClassT const>(fptr);
1.1552 +}
1.1553 +
1.1554 +///////////////////////////////////////////////////////////////////////////////
1.1555 +//
1.1556 +// Member function pointer binder (specialization for 1 arg)
1.1557 +//
1.1558 +///////////////////////////////////////////////////////////////////////////////
1.1559 +template <typename RT, typename ClassT, typename A>
1.1560 +struct member_function_ptr_action<RT, ClassT,
1.1561 + A, nil_t, nil_t,
1.1562 +#if PHOENIX_LIMIT > 3
1.1563 + nil_t, nil_t, nil_t,
1.1564 +#if PHOENIX_LIMIT > 6
1.1565 + nil_t, nil_t, nil_t,
1.1566 +#if PHOENIX_LIMIT > 9
1.1567 + nil_t, nil_t, nil_t,
1.1568 +#if PHOENIX_LIMIT > 12
1.1569 + nil_t, nil_t, nil_t,
1.1570 +#endif
1.1571 +#endif
1.1572 +#endif
1.1573 +#endif
1.1574 + nil_t // Unused
1.1575 +> {
1.1576 +
1.1577 + typedef RT result_type;
1.1578 + typedef RT(ClassT::*mf)(A);
1.1579 + typedef RT(ClassT::*cmf)(A) const;
1.1580 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.1581 + mem_func_ptr_t;
1.1582 +
1.1583 + template <typename CT, typename A_>
1.1584 + struct result { typedef result_type type; };
1.1585 +
1.1586 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.1587 + : fptr(fptr_) {}
1.1588 +
1.1589 + template <typename CT>
1.1590 + result_type operator()(CT& obj, A a) const
1.1591 + { return (impl::as_ptr<CT>::get(obj)->*fptr)(a); }
1.1592 +
1.1593 + mem_func_ptr_t fptr;
1.1594 +};
1.1595 +
1.1596 +//////////////////////////////////
1.1597 +template <typename RT, typename ClassT, typename A>
1.1598 +inline member_function_ptr<RT, ClassT, A>
1.1599 +bind(RT(ClassT::*fptr)(A))
1.1600 +{
1.1601 + return member_function_ptr<RT, ClassT, A>(fptr);
1.1602 +}
1.1603 +
1.1604 +//////////////////////////////////
1.1605 +template <typename RT, typename ClassT, typename A>
1.1606 +inline member_function_ptr<RT, ClassT const, A>
1.1607 +bind(RT(ClassT::*fptr)(A) const)
1.1608 +{
1.1609 + return member_function_ptr<RT, ClassT const, A>(fptr);
1.1610 +}
1.1611 +
1.1612 +///////////////////////////////////////////////////////////////////////////////
1.1613 +//
1.1614 +// Member function pointer binder (specialization for 2 args)
1.1615 +//
1.1616 +///////////////////////////////////////////////////////////////////////////////
1.1617 +template <typename RT, typename ClassT, typename A, typename B>
1.1618 +struct member_function_ptr_action<RT, ClassT,
1.1619 + A, B, nil_t,
1.1620 +#if PHOENIX_LIMIT > 3
1.1621 + nil_t, nil_t, nil_t,
1.1622 +#if PHOENIX_LIMIT > 6
1.1623 + nil_t, nil_t, nil_t,
1.1624 +#if PHOENIX_LIMIT > 9
1.1625 + nil_t, nil_t, nil_t,
1.1626 +#if PHOENIX_LIMIT > 12
1.1627 + nil_t, nil_t, nil_t,
1.1628 +#endif
1.1629 +#endif
1.1630 +#endif
1.1631 +#endif
1.1632 + nil_t // Unused
1.1633 +> {
1.1634 +
1.1635 + typedef RT result_type;
1.1636 + typedef RT(ClassT::*mf)(A, B);
1.1637 + typedef RT(ClassT::*cmf)(A, B) const;
1.1638 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.1639 + mem_func_ptr_t;
1.1640 +
1.1641 + template <typename CT, typename A_, typename B_>
1.1642 + struct result { typedef result_type type; };
1.1643 +
1.1644 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.1645 + : fptr(fptr_) {}
1.1646 +
1.1647 + template <typename CT>
1.1648 + result_type operator()(CT& obj, A a, B b) const
1.1649 + { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b); }
1.1650 +
1.1651 + mem_func_ptr_t fptr;
1.1652 +};
1.1653 +
1.1654 +//////////////////////////////////
1.1655 +template <typename RT, typename ClassT, typename A, typename B>
1.1656 +inline member_function_ptr<RT, ClassT, A, B>
1.1657 +bind(RT(ClassT::*fptr)(A, B))
1.1658 +{
1.1659 + return member_function_ptr<RT, ClassT, A, B>(fptr);
1.1660 +}
1.1661 +
1.1662 +//////////////////////////////////
1.1663 +template <typename RT, typename ClassT, typename A, typename B>
1.1664 +inline member_function_ptr<RT, ClassT const, A, B>
1.1665 +bind(RT(ClassT::*fptr)(A, B) const)
1.1666 +{
1.1667 + return member_function_ptr<RT, ClassT const, A, B>(fptr);
1.1668 +}
1.1669 +
1.1670 +#if PHOENIX_LIMIT > 3
1.1671 +///////////////////////////////////////////////////////////////////////////////
1.1672 +//
1.1673 +// Member function pointer binder (specialization for 3 args)
1.1674 +//
1.1675 +///////////////////////////////////////////////////////////////////////////////
1.1676 +template <typename RT, typename ClassT, typename A, typename B, typename C>
1.1677 +struct member_function_ptr_action<RT, ClassT,
1.1678 + A, B, C, nil_t, nil_t, nil_t,
1.1679 +#if PHOENIX_LIMIT > 6
1.1680 + nil_t, nil_t, nil_t,
1.1681 +#if PHOENIX_LIMIT > 9
1.1682 + nil_t, nil_t, nil_t,
1.1683 +#if PHOENIX_LIMIT > 12
1.1684 + nil_t, nil_t, nil_t,
1.1685 +#endif
1.1686 +#endif
1.1687 +#endif
1.1688 + nil_t // Unused
1.1689 +> {
1.1690 +
1.1691 + typedef RT result_type;
1.1692 + typedef RT(ClassT::*mf)(A, B, C);
1.1693 + typedef RT(ClassT::*cmf)(A, B, C) const;
1.1694 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.1695 + mem_func_ptr_t;
1.1696 +
1.1697 + template <typename CT, typename A_, typename B_, typename C_>
1.1698 + struct result { typedef result_type type; };
1.1699 +
1.1700 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.1701 + : fptr(fptr_) {}
1.1702 +
1.1703 + template <typename CT>
1.1704 + result_type operator()(CT& obj, A a, B b, C c) const
1.1705 + { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c); }
1.1706 +
1.1707 + mem_func_ptr_t fptr;
1.1708 +};
1.1709 +
1.1710 +//////////////////////////////////
1.1711 +template <typename RT, typename ClassT, typename A, typename B, typename C>
1.1712 +inline member_function_ptr<RT, ClassT, A, B, C>
1.1713 +bind(RT(ClassT::*fptr)(A, B, C))
1.1714 +{
1.1715 + return member_function_ptr<RT, ClassT, A, B, C>(fptr);
1.1716 +}
1.1717 +
1.1718 +//////////////////////////////////
1.1719 +template <typename RT, typename ClassT, typename A, typename B, typename C>
1.1720 +inline member_function_ptr<RT, ClassT const, A, B, C>
1.1721 +bind(RT(ClassT::*fptr)(A, B, C) const)
1.1722 +{
1.1723 + return member_function_ptr<RT, ClassT const, A, B, C>(fptr);
1.1724 +}
1.1725 +
1.1726 +///////////////////////////////////////////////////////////////////////////////
1.1727 +//
1.1728 +// Member function pointer binder (specialization for 4 args)
1.1729 +//
1.1730 +///////////////////////////////////////////////////////////////////////////////
1.1731 +template <typename RT, typename ClassT,
1.1732 + typename A, typename B, typename C, typename D
1.1733 +>
1.1734 +struct member_function_ptr_action<RT, ClassT,
1.1735 + A, B, C, D, nil_t, nil_t,
1.1736 +#if PHOENIX_LIMIT > 6
1.1737 + nil_t, nil_t, nil_t,
1.1738 +#if PHOENIX_LIMIT > 9
1.1739 + nil_t, nil_t, nil_t,
1.1740 +#if PHOENIX_LIMIT > 12
1.1741 + nil_t, nil_t, nil_t,
1.1742 +#endif
1.1743 +#endif
1.1744 +#endif
1.1745 + nil_t // Unused
1.1746 +> {
1.1747 +
1.1748 + typedef RT result_type;
1.1749 + typedef RT(ClassT::*mf)(A, B, C, D);
1.1750 + typedef RT(ClassT::*cmf)(A, B, C, D) const;
1.1751 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.1752 + mem_func_ptr_t;
1.1753 +
1.1754 + template <typename CT,
1.1755 + typename A_, typename B_, typename C_, typename D_
1.1756 + >
1.1757 + struct result { typedef result_type type; };
1.1758 +
1.1759 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.1760 + : fptr(fptr_) {}
1.1761 +
1.1762 + template <typename CT>
1.1763 + result_type operator()(CT& obj,
1.1764 + A a, B b, C c, D d
1.1765 + ) const
1.1766 + { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c, d); }
1.1767 +
1.1768 + mem_func_ptr_t fptr;
1.1769 +};
1.1770 +
1.1771 +//////////////////////////////////
1.1772 +template <typename RT, typename ClassT,
1.1773 + typename A, typename B, typename C, typename D
1.1774 +>
1.1775 +inline member_function_ptr<RT, ClassT, A, B, C, D>
1.1776 +bind(RT(ClassT::*fptr)(A, B, C, D))
1.1777 +{
1.1778 + return member_function_ptr<
1.1779 + RT, ClassT, A, B, C, D>(fptr);
1.1780 +}
1.1781 +
1.1782 +//////////////////////////////////
1.1783 +template <typename RT, typename ClassT,
1.1784 + typename A, typename B, typename C, typename D
1.1785 +>
1.1786 +inline member_function_ptr<RT, ClassT const, A, B, C, D>
1.1787 +bind(RT(ClassT::*fptr)(A, B, C, D) const)
1.1788 +{
1.1789 + return member_function_ptr<
1.1790 + RT, ClassT const, A, B, C, D>(fptr);
1.1791 +}
1.1792 +
1.1793 +///////////////////////////////////////////////////////////////////////////////
1.1794 +//
1.1795 +// Member function pointer binder (specialization for 5 args)
1.1796 +//
1.1797 +///////////////////////////////////////////////////////////////////////////////
1.1798 +template <typename RT, typename ClassT,
1.1799 + typename A, typename B, typename C, typename D,
1.1800 + typename E
1.1801 +>
1.1802 +struct member_function_ptr_action<RT, ClassT,
1.1803 + A, B, C, D, E, nil_t,
1.1804 +#if PHOENIX_LIMIT > 6
1.1805 + nil_t, nil_t, nil_t,
1.1806 +#if PHOENIX_LIMIT > 9
1.1807 + nil_t, nil_t, nil_t,
1.1808 +#if PHOENIX_LIMIT > 12
1.1809 + nil_t, nil_t, nil_t,
1.1810 +#endif
1.1811 +#endif
1.1812 +#endif
1.1813 + nil_t // Unused
1.1814 +> {
1.1815 +
1.1816 + typedef RT result_type;
1.1817 + typedef RT(ClassT::*mf)(A, B, C, D, E);
1.1818 + typedef RT(ClassT::*cmf)(A, B, C, D, E) const;
1.1819 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.1820 + mem_func_ptr_t;
1.1821 +
1.1822 + template <typename CT,
1.1823 + typename A_, typename B_, typename C_, typename D_,
1.1824 + typename E_
1.1825 + >
1.1826 + struct result { typedef result_type type; };
1.1827 +
1.1828 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.1829 + : fptr(fptr_) {}
1.1830 +
1.1831 + template <typename CT>
1.1832 + result_type operator()(CT& obj,
1.1833 + A a, B b, C c, D d, E e
1.1834 + ) const
1.1835 + { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c, d, e); }
1.1836 +
1.1837 + mem_func_ptr_t fptr;
1.1838 +};
1.1839 +
1.1840 +//////////////////////////////////
1.1841 +template <typename RT, typename ClassT,
1.1842 + typename A, typename B, typename C, typename D,
1.1843 + typename E
1.1844 +>
1.1845 +inline member_function_ptr<RT, ClassT, A, B, C, D, E>
1.1846 +bind(RT(ClassT::*fptr)(A, B, C, D, E))
1.1847 +{
1.1848 + return member_function_ptr<
1.1849 + RT, ClassT, A, B, C, D, E>(fptr);
1.1850 +}
1.1851 +
1.1852 +//////////////////////////////////
1.1853 +template <typename RT, typename ClassT,
1.1854 + typename A, typename B, typename C, typename D,
1.1855 + typename E
1.1856 +>
1.1857 +inline member_function_ptr<RT, ClassT const, A, B, C, D, E>
1.1858 +bind(RT(ClassT::*fptr)(A, B, C, D, E) const)
1.1859 +{
1.1860 + return member_function_ptr<
1.1861 + RT, ClassT const, A, B, C, D, E>(fptr);
1.1862 +}
1.1863 +
1.1864 +#if PHOENIX_LIMIT > 6
1.1865 +///////////////////////////////////////////////////////////////////////////////
1.1866 +//
1.1867 +// Member function pointer binder (specialization for 6 args)
1.1868 +//
1.1869 +///////////////////////////////////////////////////////////////////////////////
1.1870 +template <typename RT, typename ClassT,
1.1871 + typename A, typename B, typename C, typename D,
1.1872 + typename E, typename F
1.1873 +>
1.1874 +struct member_function_ptr_action<RT, ClassT,
1.1875 + A, B, C, D, E, F, nil_t, nil_t, nil_t,
1.1876 +#if PHOENIX_LIMIT > 9
1.1877 + nil_t, nil_t, nil_t,
1.1878 +#if PHOENIX_LIMIT > 12
1.1879 + nil_t, nil_t, nil_t,
1.1880 +#endif
1.1881 +#endif
1.1882 + nil_t // Unused
1.1883 +> {
1.1884 +
1.1885 + typedef RT result_type;
1.1886 + typedef RT(ClassT::*mf)(A, B, C, D, E, F);
1.1887 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F) const;
1.1888 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.1889 + mem_func_ptr_t;
1.1890 +
1.1891 + template <typename CT,
1.1892 + typename A_, typename B_, typename C_, typename D_,
1.1893 + typename E_, typename F_
1.1894 + >
1.1895 + struct result { typedef result_type type; };
1.1896 +
1.1897 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.1898 + : fptr(fptr_) {}
1.1899 +
1.1900 + template <typename CT>
1.1901 + result_type operator()(CT& obj,
1.1902 + A a, B b, C c, D d, E e, F f
1.1903 + ) const
1.1904 + { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c, d, e, f); }
1.1905 +
1.1906 + mem_func_ptr_t fptr;
1.1907 +};
1.1908 +
1.1909 +//////////////////////////////////
1.1910 +template <typename RT, typename ClassT,
1.1911 + typename A, typename B, typename C, typename D,
1.1912 + typename E, typename F
1.1913 +>
1.1914 +inline member_function_ptr<RT, ClassT, A, B, C, D, E, F>
1.1915 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F))
1.1916 +{
1.1917 + return member_function_ptr<
1.1918 + RT, ClassT, A, B, C, D, E, F>(fptr);
1.1919 +}
1.1920 +
1.1921 +//////////////////////////////////
1.1922 +template <typename RT, typename ClassT,
1.1923 + typename A, typename B, typename C, typename D,
1.1924 + typename E, typename F
1.1925 +>
1.1926 +inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F>
1.1927 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F) const)
1.1928 +{
1.1929 + return member_function_ptr<
1.1930 + RT, ClassT const, A, B, C, D, E, F>(fptr);
1.1931 +}
1.1932 +
1.1933 +///////////////////////////////////////////////////////////////////////////////
1.1934 +//
1.1935 +// Member function pointer binder (specialization for 7 args)
1.1936 +//
1.1937 +///////////////////////////////////////////////////////////////////////////////
1.1938 +template <typename RT, typename ClassT,
1.1939 + typename A, typename B, typename C, typename D,
1.1940 + typename E, typename F, typename G
1.1941 +>
1.1942 +struct member_function_ptr_action<RT, ClassT,
1.1943 + A, B, C, D, E, F, G, nil_t, nil_t,
1.1944 +#if PHOENIX_LIMIT > 9
1.1945 + nil_t, nil_t, nil_t,
1.1946 +#if PHOENIX_LIMIT > 12
1.1947 + nil_t, nil_t, nil_t,
1.1948 +#endif
1.1949 +#endif
1.1950 + nil_t // Unused
1.1951 +> {
1.1952 +
1.1953 + typedef RT result_type;
1.1954 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G);
1.1955 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G) const;
1.1956 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.1957 + mem_func_ptr_t;
1.1958 +
1.1959 + template <typename CT,
1.1960 + typename A_, typename B_, typename C_, typename D_,
1.1961 + typename E_, typename F_, typename G_
1.1962 + >
1.1963 + struct result { typedef result_type type; };
1.1964 +
1.1965 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.1966 + : fptr(fptr_) {}
1.1967 +
1.1968 + template <typename CT>
1.1969 + result_type operator()(CT& obj,
1.1970 + A a, B b, C c, D d, E e, F f, G g
1.1971 + ) const
1.1972 + { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c, d, e, f, g); }
1.1973 +
1.1974 + mem_func_ptr_t fptr;
1.1975 +};
1.1976 +
1.1977 +//////////////////////////////////
1.1978 +template <typename RT, typename ClassT,
1.1979 + typename A, typename B, typename C, typename D,
1.1980 + typename E, typename F, typename G
1.1981 +>
1.1982 +inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G>
1.1983 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G))
1.1984 +{
1.1985 + return member_function_ptr<
1.1986 + RT, ClassT, A, B, C, D, E, F, G>(fptr);
1.1987 +}
1.1988 +
1.1989 +//////////////////////////////////
1.1990 +template <typename RT, typename ClassT,
1.1991 + typename A, typename B, typename C, typename D,
1.1992 + typename E, typename F, typename G
1.1993 +>
1.1994 +inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G>
1.1995 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G) const)
1.1996 +{
1.1997 + return member_function_ptr<
1.1998 + RT, ClassT const, A, B, C, D, E, F, G>(fptr);
1.1999 +}
1.2000 +
1.2001 +///////////////////////////////////////////////////////////////////////////////
1.2002 +//
1.2003 +// Member function pointer binder (specialization for 8 args)
1.2004 +//
1.2005 +///////////////////////////////////////////////////////////////////////////////
1.2006 +template <typename RT, typename ClassT,
1.2007 + typename A, typename B, typename C, typename D,
1.2008 + typename E, typename F, typename G, typename H
1.2009 +>
1.2010 +struct member_function_ptr_action<RT, ClassT,
1.2011 + A, B, C, D, E, F, G, H, nil_t,
1.2012 +#if PHOENIX_LIMIT > 9
1.2013 + nil_t, nil_t, nil_t,
1.2014 +#if PHOENIX_LIMIT > 12
1.2015 + nil_t, nil_t, nil_t,
1.2016 +#endif
1.2017 +#endif
1.2018 + nil_t // Unused
1.2019 +> {
1.2020 +
1.2021 + typedef RT result_type;
1.2022 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H);
1.2023 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H) const;
1.2024 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.2025 + mem_func_ptr_t;
1.2026 +
1.2027 + template <typename CT,
1.2028 + typename A_, typename B_, typename C_, typename D_,
1.2029 + typename E_, typename F_, typename G_, typename H_
1.2030 + >
1.2031 + struct result { typedef result_type type; };
1.2032 +
1.2033 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.2034 + : fptr(fptr_) {}
1.2035 +
1.2036 + template <typename CT>
1.2037 + result_type operator()(CT& obj,
1.2038 + A a, B b, C c, D d, E e, F f, G g, H h
1.2039 + ) const
1.2040 + { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c, d, e, f, g, h); }
1.2041 +
1.2042 + mem_func_ptr_t fptr;
1.2043 +};
1.2044 +
1.2045 +//////////////////////////////////
1.2046 +template <typename RT, typename ClassT,
1.2047 + typename A, typename B, typename C, typename D,
1.2048 + typename E, typename F, typename G, typename H
1.2049 +>
1.2050 +inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H>
1.2051 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H))
1.2052 +{
1.2053 + return member_function_ptr<
1.2054 + RT, ClassT, A, B, C, D, E, F, G, H>(fptr);
1.2055 +}
1.2056 +
1.2057 +//////////////////////////////////
1.2058 +template <typename RT, typename ClassT,
1.2059 + typename A, typename B, typename C, typename D,
1.2060 + typename E, typename F, typename G, typename H
1.2061 +>
1.2062 +inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H>
1.2063 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H) const)
1.2064 +{
1.2065 + return member_function_ptr<
1.2066 + RT, ClassT const, A, B, C, D, E, F, G, H>(fptr);
1.2067 +}
1.2068 +
1.2069 +#if PHOENIX_LIMIT > 9
1.2070 +///////////////////////////////////////////////////////////////////////////////
1.2071 +//
1.2072 +// Member function pointer binder (specialization for 9 args)
1.2073 +//
1.2074 +///////////////////////////////////////////////////////////////////////////////
1.2075 +template <typename RT, typename ClassT,
1.2076 + typename A, typename B, typename C, typename D,
1.2077 + typename E, typename F, typename G, typename H, typename I
1.2078 +>
1.2079 +struct member_function_ptr_action<RT, ClassT,
1.2080 + A, B, C, D, E, F, G, H, I, nil_t, nil_t, nil_t,
1.2081 +#if PHOENIX_LIMIT > 12
1.2082 + nil_t, nil_t, nil_t,
1.2083 +#endif
1.2084 + nil_t // Unused
1.2085 +> {
1.2086 +
1.2087 + typedef RT result_type;
1.2088 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I);
1.2089 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I) const;
1.2090 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.2091 + mem_func_ptr_t;
1.2092 +
1.2093 + template <typename CT,
1.2094 + typename A_, typename B_, typename C_, typename D_,
1.2095 + typename E_, typename F_, typename G_, typename H_, typename I_
1.2096 + >
1.2097 + struct result { typedef result_type type; };
1.2098 +
1.2099 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.2100 + : fptr(fptr_) {}
1.2101 +
1.2102 + template <typename CT>
1.2103 + result_type operator()(CT& obj,
1.2104 + A a, B b, C c, D d, E e, F f, G g, H h, I i
1.2105 + ) const
1.2106 + { return (impl::as_ptr<CT>::get(obj)->*fptr)(a, b, c, d, e, f, g, h, i); }
1.2107 +
1.2108 + mem_func_ptr_t fptr;
1.2109 +};
1.2110 +
1.2111 +//////////////////////////////////
1.2112 +template <typename RT, typename ClassT,
1.2113 + typename A, typename B, typename C, typename D,
1.2114 + typename E, typename F, typename G, typename H, typename I
1.2115 +>
1.2116 +inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I>
1.2117 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I))
1.2118 +{
1.2119 + return member_function_ptr<
1.2120 + RT, ClassT, A, B, C, D, E, F, G, H, I>(fptr);
1.2121 +}
1.2122 +
1.2123 +//////////////////////////////////
1.2124 +template <typename RT, typename ClassT,
1.2125 + typename A, typename B, typename C, typename D,
1.2126 + typename E, typename F, typename G, typename H, typename I
1.2127 +>
1.2128 +inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I>
1.2129 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I) const)
1.2130 +{
1.2131 + return member_function_ptr<
1.2132 + RT, ClassT const, A, B, C, D, E, F, G, H, I>(fptr);
1.2133 +}
1.2134 +
1.2135 +///////////////////////////////////////////////////////////////////////////////
1.2136 +//
1.2137 +// Member function pointer binder (specialization for 10 args)
1.2138 +//
1.2139 +///////////////////////////////////////////////////////////////////////////////
1.2140 +template <typename RT, typename ClassT,
1.2141 + typename A, typename B, typename C, typename D,
1.2142 + typename E, typename F, typename G, typename H, typename I,
1.2143 + typename J
1.2144 +>
1.2145 +struct member_function_ptr_action<RT, ClassT,
1.2146 + A, B, C, D, E, F, G, H, I, J, nil_t, nil_t,
1.2147 +#if PHOENIX_LIMIT > 12
1.2148 + nil_t, nil_t, nil_t,
1.2149 +#endif
1.2150 + nil_t // Unused
1.2151 +> {
1.2152 +
1.2153 + typedef RT result_type;
1.2154 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J);
1.2155 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J) const;
1.2156 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.2157 + mem_func_ptr_t;
1.2158 +
1.2159 + template <typename CT,
1.2160 + typename A_, typename B_, typename C_, typename D_,
1.2161 + typename E_, typename F_, typename G_, typename H_, typename I_,
1.2162 + typename J_
1.2163 + >
1.2164 + struct result { typedef result_type type; };
1.2165 +
1.2166 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.2167 + : fptr(fptr_) {}
1.2168 +
1.2169 + template <typename CT>
1.2170 + result_type operator()(CT& obj,
1.2171 + A a, B b, C c, D d, E e, F f, G g, H h, I i, J j
1.2172 + ) const
1.2173 + {
1.2174 + return (impl::as_ptr<CT>::get(obj)->*fptr)
1.2175 + (a, b, c, d, e, f, g, h, i, j);
1.2176 + }
1.2177 +
1.2178 + mem_func_ptr_t fptr;
1.2179 +};
1.2180 +
1.2181 +//////////////////////////////////
1.2182 +template <typename RT, typename ClassT,
1.2183 + typename A, typename B, typename C, typename D,
1.2184 + typename E, typename F, typename G, typename H, typename I,
1.2185 + typename J
1.2186 +>
1.2187 +inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I, J>
1.2188 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J))
1.2189 +{
1.2190 + return member_function_ptr<
1.2191 + RT, ClassT, A, B, C, D, E, F, G, H, I, J>(fptr);
1.2192 +}
1.2193 +
1.2194 +//////////////////////////////////
1.2195 +template <typename RT, typename ClassT,
1.2196 + typename A, typename B, typename C, typename D,
1.2197 + typename E, typename F, typename G, typename H, typename I,
1.2198 + typename J
1.2199 +>
1.2200 +inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I, J>
1.2201 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J) const)
1.2202 +{
1.2203 + return member_function_ptr<
1.2204 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J>(fptr);
1.2205 +}
1.2206 +
1.2207 +///////////////////////////////////////////////////////////////////////////////
1.2208 +//
1.2209 +// Member function pointer binder (specialization for 11 args)
1.2210 +//
1.2211 +///////////////////////////////////////////////////////////////////////////////
1.2212 +template <typename RT, typename ClassT,
1.2213 + typename A, typename B, typename C, typename D,
1.2214 + typename E, typename F, typename G, typename H, typename I,
1.2215 + typename J, typename K
1.2216 +>
1.2217 +struct member_function_ptr_action<RT, ClassT,
1.2218 + A, B, C, D, E, F, G, H, I, J, K, nil_t,
1.2219 +#if PHOENIX_LIMIT > 12
1.2220 + nil_t, nil_t, nil_t,
1.2221 +#endif
1.2222 + nil_t // Unused
1.2223 +> {
1.2224 +
1.2225 + typedef RT result_type;
1.2226 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K);
1.2227 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K) const;
1.2228 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.2229 + mem_func_ptr_t;
1.2230 +
1.2231 + template <typename CT,
1.2232 + typename A_, typename B_, typename C_, typename D_,
1.2233 + typename E_, typename F_, typename G_, typename H_, typename I_,
1.2234 + typename J_, typename K_
1.2235 + >
1.2236 + struct result { typedef result_type type; };
1.2237 +
1.2238 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.2239 + : fptr(fptr_) {}
1.2240 +
1.2241 + template <typename CT>
1.2242 + result_type operator()(CT& obj,
1.2243 + A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k
1.2244 + ) const
1.2245 + {
1.2246 + return (impl::as_ptr<CT>::get(obj)->*fptr)
1.2247 + (a, b, c, d, e, f, g, h, i, j, k);
1.2248 + }
1.2249 +
1.2250 + mem_func_ptr_t fptr;
1.2251 +};
1.2252 +
1.2253 +//////////////////////////////////
1.2254 +template <typename RT, typename ClassT,
1.2255 + typename A, typename B, typename C, typename D,
1.2256 + typename E, typename F, typename G, typename H, typename I,
1.2257 + typename J, typename K
1.2258 +>
1.2259 +inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K>
1.2260 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K))
1.2261 +{
1.2262 + return member_function_ptr<
1.2263 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K>(fptr);
1.2264 +}
1.2265 +
1.2266 +//////////////////////////////////
1.2267 +template <typename RT, typename ClassT,
1.2268 + typename A, typename B, typename C, typename D,
1.2269 + typename E, typename F, typename G, typename H, typename I,
1.2270 + typename J, typename K
1.2271 +>
1.2272 +inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K>
1.2273 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K) const)
1.2274 +{
1.2275 + return member_function_ptr<
1.2276 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K>(fptr);
1.2277 +}
1.2278 +
1.2279 +#if PHOENIX_LIMIT > 12
1.2280 +///////////////////////////////////////////////////////////////////////////////
1.2281 +//
1.2282 +// Member function pointer binder (specialization for 12 args)
1.2283 +//
1.2284 +///////////////////////////////////////////////////////////////////////////////
1.2285 +template <typename RT, typename ClassT,
1.2286 + typename A, typename B, typename C, typename D,
1.2287 + typename E, typename F, typename G, typename H, typename I,
1.2288 + typename J, typename K, typename L
1.2289 +>
1.2290 +struct member_function_ptr_action<RT, ClassT,
1.2291 + A, B, C, D, E, F, G, H, I, J, K, L, nil_t, nil_t, nil_t, nil_t> {
1.2292 +
1.2293 + typedef RT result_type;
1.2294 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L);
1.2295 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L) const;
1.2296 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.2297 + mem_func_ptr_t;
1.2298 +
1.2299 + template <typename CT,
1.2300 + typename A_, typename B_, typename C_, typename D_,
1.2301 + typename E_, typename F_, typename G_, typename H_, typename I_,
1.2302 + typename J_, typename K_, typename L_
1.2303 + >
1.2304 + struct result { typedef result_type type; };
1.2305 +
1.2306 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.2307 + : fptr(fptr_) {}
1.2308 +
1.2309 + template <typename CT>
1.2310 + result_type operator()(CT& obj,
1.2311 + A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l
1.2312 + ) const
1.2313 + {
1.2314 + return (impl::as_ptr<CT>::get(obj)->*fptr)
1.2315 + (a, b, c, d, e, f, g, h, i, j, k, l);
1.2316 + }
1.2317 +
1.2318 + mem_func_ptr_t fptr;
1.2319 +};
1.2320 +
1.2321 +//////////////////////////////////
1.2322 +template <typename RT, typename ClassT,
1.2323 + typename A, typename B, typename C, typename D,
1.2324 + typename E, typename F, typename G, typename H, typename I,
1.2325 + typename J, typename K, typename L
1.2326 +>
1.2327 +inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L>
1.2328 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L))
1.2329 +{
1.2330 + return member_function_ptr<
1.2331 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L>(fptr);
1.2332 +}
1.2333 +
1.2334 +//////////////////////////////////
1.2335 +template <typename RT, typename ClassT,
1.2336 + typename A, typename B, typename C, typename D,
1.2337 + typename E, typename F, typename G, typename H, typename I,
1.2338 + typename J, typename K, typename L
1.2339 +>
1.2340 +inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L>
1.2341 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L) const)
1.2342 +{
1.2343 + return member_function_ptr<
1.2344 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L>(fptr);
1.2345 +}
1.2346 +
1.2347 +///////////////////////////////////////////////////////////////////////////////
1.2348 +//
1.2349 +// Member function pointer binder (specialization for 13 args)
1.2350 +//
1.2351 +///////////////////////////////////////////////////////////////////////////////
1.2352 +template <typename RT, typename ClassT,
1.2353 + typename A, typename B, typename C, typename D,
1.2354 + typename E, typename F, typename G, typename H, typename I,
1.2355 + typename J, typename K, typename L, typename M
1.2356 +>
1.2357 +struct member_function_ptr_action<RT, ClassT,
1.2358 + A, B, C, D, E, F, G, H, I, J, K, L, M, nil_t, nil_t, nil_t> {
1.2359 +
1.2360 + typedef RT result_type;
1.2361 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L, M);
1.2362 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L, M) const;
1.2363 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.2364 + mem_func_ptr_t;
1.2365 +
1.2366 + template <typename CT,
1.2367 + typename A_, typename B_, typename C_, typename D_,
1.2368 + typename E_, typename F_, typename G_, typename H_, typename I_,
1.2369 + typename J_, typename K_, typename L_, typename M_
1.2370 + >
1.2371 + struct result { typedef result_type type; };
1.2372 +
1.2373 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.2374 + : fptr(fptr_) {}
1.2375 +
1.2376 + template <typename CT>
1.2377 + result_type operator()(CT& obj,
1.2378 + A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m
1.2379 + ) const
1.2380 + {
1.2381 + return (impl::as_ptr<CT>::get(obj)->*fptr)
1.2382 + (a, b, c, d, e, f, g, h, i, j, k, l, m);
1.2383 + }
1.2384 +
1.2385 + mem_func_ptr_t fptr;
1.2386 +};
1.2387 +
1.2388 +//////////////////////////////////
1.2389 +template <typename RT, typename ClassT,
1.2390 + typename A, typename B, typename C, typename D,
1.2391 + typename E, typename F, typename G, typename H, typename I,
1.2392 + typename J, typename K, typename L, typename M
1.2393 +>
1.2394 +inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M>
1.2395 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M))
1.2396 +{
1.2397 + return member_function_ptr<
1.2398 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M>(fptr);
1.2399 +}
1.2400 +
1.2401 +//////////////////////////////////
1.2402 +template <typename RT, typename ClassT,
1.2403 + typename A, typename B, typename C, typename D,
1.2404 + typename E, typename F, typename G, typename H, typename I,
1.2405 + typename J, typename K, typename L, typename M
1.2406 +>
1.2407 +inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M>
1.2408 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M) const)
1.2409 +{
1.2410 + return member_function_ptr<
1.2411 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M>(fptr);
1.2412 +}
1.2413 +
1.2414 +///////////////////////////////////////////////////////////////////////////////
1.2415 +//
1.2416 +// Member function pointer binder (specialization for 14 args)
1.2417 +//
1.2418 +///////////////////////////////////////////////////////////////////////////////
1.2419 +template <typename RT, typename ClassT,
1.2420 + typename A, typename B, typename C, typename D,
1.2421 + typename E, typename F, typename G, typename H, typename I,
1.2422 + typename J, typename K, typename L, typename M, typename N
1.2423 +>
1.2424 +struct member_function_ptr_action<RT, ClassT,
1.2425 + A, B, C, D, E, F, G, H, I, J, K, L, M, N, nil_t, nil_t> {
1.2426 +
1.2427 + typedef RT result_type;
1.2428 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N);
1.2429 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N) const;
1.2430 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.2431 + mem_func_ptr_t;
1.2432 +
1.2433 + template <typename CT,
1.2434 + typename A_, typename B_, typename C_, typename D_,
1.2435 + typename E_, typename F_, typename G_, typename H_, typename I_,
1.2436 + typename J_, typename K_, typename L_, typename M_, typename N_
1.2437 + >
1.2438 + struct result { typedef result_type type; };
1.2439 +
1.2440 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.2441 + : fptr(fptr_) {}
1.2442 +
1.2443 + template <typename CT>
1.2444 + result_type operator()(CT& obj,
1.2445 + A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n
1.2446 + ) const
1.2447 + {
1.2448 + return (impl::as_ptr<CT>::get(obj)->*fptr)
1.2449 + (a, b, c, d, e, f, g, h, i, j, k, l, m, n);
1.2450 + }
1.2451 +
1.2452 + mem_func_ptr_t fptr;
1.2453 +};
1.2454 +
1.2455 +//////////////////////////////////
1.2456 +template <typename RT, typename ClassT,
1.2457 + typename A, typename B, typename C, typename D,
1.2458 + typename E, typename F, typename G, typename H, typename I,
1.2459 + typename J, typename K, typename L, typename M, typename N
1.2460 +>
1.2461 +inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
1.2462 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N))
1.2463 +{
1.2464 + return member_function_ptr<
1.2465 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(fptr);
1.2466 +}
1.2467 +
1.2468 +//////////////////////////////////
1.2469 +template <typename RT, typename ClassT,
1.2470 + typename A, typename B, typename C, typename D,
1.2471 + typename E, typename F, typename G, typename H, typename I,
1.2472 + typename J, typename K, typename L, typename M, typename N
1.2473 +>
1.2474 +inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
1.2475 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N) const)
1.2476 +{
1.2477 + return member_function_ptr<
1.2478 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(fptr);
1.2479 +}
1.2480 +
1.2481 +///////////////////////////////////////////////////////////////////////////////
1.2482 +//
1.2483 +// Member function pointer binder (specialization for 15 args)
1.2484 +//
1.2485 +///////////////////////////////////////////////////////////////////////////////
1.2486 +template <typename RT, typename ClassT,
1.2487 + typename A, typename B, typename C, typename D,
1.2488 + typename E, typename F, typename G, typename H, typename I,
1.2489 + typename J, typename K, typename L, typename M, typename N,
1.2490 + typename O
1.2491 +>
1.2492 +struct member_function_ptr_action<RT, ClassT,
1.2493 + A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, nil_t> {
1.2494 +
1.2495 + typedef RT result_type;
1.2496 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O);
1.2497 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) const;
1.2498 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.2499 + mem_func_ptr_t;
1.2500 +
1.2501 + template <typename CT,
1.2502 + typename A_, typename B_, typename C_, typename D_,
1.2503 + typename E_, typename F_, typename G_, typename H_, typename I_,
1.2504 + typename J_, typename K_, typename L_, typename M_, typename N_,
1.2505 + typename O_
1.2506 + >
1.2507 + struct result { typedef result_type type; };
1.2508 +
1.2509 + member_function_ptr_action(mem_func_ptr_t fptr_)
1.2510 + : fptr(fptr_) {}
1.2511 +
1.2512 + template <typename CT>
1.2513 + result_type operator()(CT& obj,
1.2514 + A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o
1.2515 + ) const
1.2516 + {
1.2517 + return (impl::as_ptr<CT>::get(obj)->*fptr)
1.2518 + (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
1.2519 + }
1.2520 +
1.2521 + mem_func_ptr_t fptr;
1.2522 +};
1.2523 +
1.2524 +//////////////////////////////////
1.2525 +template <typename RT, typename ClassT,
1.2526 + typename A, typename B, typename C, typename D,
1.2527 + typename E, typename F, typename G, typename H, typename I,
1.2528 + typename J, typename K, typename L, typename M, typename N,
1.2529 + typename O
1.2530 +>
1.2531 +inline member_function_ptr<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
1.2532 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O))
1.2533 +{
1.2534 + return member_function_ptr<
1.2535 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(fptr);
1.2536 +}
1.2537 +
1.2538 +//////////////////////////////////
1.2539 +template <typename RT, typename ClassT,
1.2540 + typename A, typename B, typename C, typename D,
1.2541 + typename E, typename F, typename G, typename H, typename I,
1.2542 + typename J, typename K, typename L, typename M, typename N,
1.2543 + typename O
1.2544 +>
1.2545 +inline member_function_ptr<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
1.2546 +bind(RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) const)
1.2547 +{
1.2548 + return member_function_ptr<
1.2549 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(fptr);
1.2550 +}
1.2551 +
1.2552 +#endif
1.2553 +#endif
1.2554 +#endif
1.2555 +#endif
1.2556 +
1.2557 +///////////////////////////////////////////////////////////////////////////////
1.2558 +//
1.2559 +// Bound member function binder (main class)
1.2560 +//
1.2561 +///////////////////////////////////////////////////////////////////////////////
1.2562 +template <
1.2563 + typename RT,
1.2564 + typename ClassT
1.2565 + , typename A = nil_t
1.2566 + , typename B = nil_t
1.2567 + , typename C = nil_t
1.2568 +
1.2569 +#if PHOENIX_LIMIT > 3
1.2570 + , typename D = nil_t
1.2571 + , typename E = nil_t
1.2572 + , typename F = nil_t
1.2573 +
1.2574 +#if PHOENIX_LIMIT > 6
1.2575 + , typename G = nil_t
1.2576 + , typename H = nil_t
1.2577 + , typename I = nil_t
1.2578 +
1.2579 +#if PHOENIX_LIMIT > 9
1.2580 + , typename J = nil_t
1.2581 + , typename K = nil_t
1.2582 + , typename L = nil_t
1.2583 +
1.2584 +#if PHOENIX_LIMIT > 12
1.2585 + , typename M = nil_t
1.2586 + , typename N = nil_t
1.2587 + , typename O = nil_t
1.2588 +
1.2589 +#endif
1.2590 +#endif
1.2591 +#endif
1.2592 +#endif
1.2593 +
1.2594 + , typename NU = nil_t // Not used
1.2595 +>
1.2596 +struct bound_member_action;
1.2597 +
1.2598 +//////////////////////////////////
1.2599 +template <
1.2600 + typename RT,
1.2601 + typename ClassT
1.2602 + , typename A = nil_t
1.2603 + , typename B = nil_t
1.2604 + , typename C = nil_t
1.2605 +
1.2606 +#if PHOENIX_LIMIT > 3
1.2607 + , typename D = nil_t
1.2608 + , typename E = nil_t
1.2609 + , typename F = nil_t
1.2610 +
1.2611 +#if PHOENIX_LIMIT > 6
1.2612 + , typename G = nil_t
1.2613 + , typename H = nil_t
1.2614 + , typename I = nil_t
1.2615 +
1.2616 +#if PHOENIX_LIMIT > 9
1.2617 + , typename J = nil_t
1.2618 + , typename K = nil_t
1.2619 + , typename L = nil_t
1.2620 +
1.2621 +#if PHOENIX_LIMIT > 12
1.2622 + , typename M = nil_t
1.2623 + , typename N = nil_t
1.2624 + , typename O = nil_t
1.2625 +
1.2626 +#endif
1.2627 +#endif
1.2628 +#endif
1.2629 +#endif
1.2630 +>
1.2631 +struct bound_member
1.2632 +: public function<bound_member_action<RT, ClassT
1.2633 + , A, B, C
1.2634 +#if PHOENIX_LIMIT > 3
1.2635 + , D, E, F
1.2636 +#if PHOENIX_LIMIT > 6
1.2637 + , G, H, I
1.2638 +#if PHOENIX_LIMIT > 9
1.2639 + , J, K, L
1.2640 +#if PHOENIX_LIMIT > 12
1.2641 + , M, N, O
1.2642 +#endif
1.2643 +#endif
1.2644 +#endif
1.2645 +#endif
1.2646 + > > {
1.2647 +
1.2648 + typedef bound_member_action<RT, ClassT
1.2649 + , A, B, C
1.2650 +#if PHOENIX_LIMIT > 3
1.2651 + , D, E, F
1.2652 +#if PHOENIX_LIMIT > 6
1.2653 + , G, H, I
1.2654 +#if PHOENIX_LIMIT > 9
1.2655 + , J, K, L
1.2656 +#if PHOENIX_LIMIT > 12
1.2657 + , M, N, O
1.2658 +#endif
1.2659 +#endif
1.2660 +#endif
1.2661 +#endif
1.2662 + > action_t;
1.2663 +
1.2664 + template <typename CT, typename FPT>
1.2665 + bound_member(CT & c, FPT fp)
1.2666 + : function<action_t>(action_t(c,fp)) {}
1.2667 +
1.2668 +#if !defined(__BORLANDC__)
1.2669 + template <typename CT, typename FPT>
1.2670 + bound_member(CT * c, FPT fp)
1.2671 + : function<action_t>(action_t(c,fp)) {}
1.2672 +#endif
1.2673 +};
1.2674 +
1.2675 +///////////////////////////////////////////////////////////////////////////////
1.2676 +//
1.2677 +// Bound member function binder (specialization for 0 arg)
1.2678 +//
1.2679 +///////////////////////////////////////////////////////////////////////////////
1.2680 +
1.2681 +template <typename RT, typename ClassT>
1.2682 +struct bound_member_action<RT, ClassT,
1.2683 + nil_t, nil_t, nil_t,
1.2684 +#if PHOENIX_LIMIT > 3
1.2685 + nil_t, nil_t, nil_t,
1.2686 +#if PHOENIX_LIMIT > 6
1.2687 + nil_t, nil_t, nil_t,
1.2688 +#if PHOENIX_LIMIT > 9
1.2689 + nil_t, nil_t, nil_t,
1.2690 +#if PHOENIX_LIMIT > 12
1.2691 + nil_t, nil_t, nil_t,
1.2692 +#endif
1.2693 +#endif
1.2694 +#endif
1.2695 +#endif
1.2696 + nil_t // Unused
1.2697 +> {
1.2698 +
1.2699 + typedef RT result_type;
1.2700 + typedef RT(ClassT::*mf)();
1.2701 + typedef RT(ClassT::*cmf)() const;
1.2702 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.2703 + mem_func_ptr_t;
1.2704 +
1.2705 + template <typename CT>
1.2706 + struct result { typedef result_type type; };
1.2707 +
1.2708 + template <typename CT>
1.2709 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.2710 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.2711 +
1.2712 + result_type operator()() const
1.2713 + { return (obj->*fptr)(); }
1.2714 +
1.2715 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.2716 + mem_func_ptr_t fptr;
1.2717 +};
1.2718 +
1.2719 +//////////////////////////////////
1.2720 +
1.2721 +template <typename RT, typename ClassT>
1.2722 +inline bound_member<RT,ClassT>
1.2723 +bind(ClassT & obj, RT(ClassT::*fptr)())
1.2724 +{
1.2725 + return bound_member<RT,ClassT>(obj, fptr);
1.2726 +}
1.2727 +
1.2728 +template <typename RT, typename ClassT>
1.2729 +inline bound_member<RT,ClassT>
1.2730 +bind(ClassT * obj, RT(ClassT::*fptr)())
1.2731 +{
1.2732 +#if defined(__MWERKS__) && (__MWERKS__ < 0x3003)
1.2733 + return bound_member<RT,ClassT>(*obj, fptr);
1.2734 +#else
1.2735 + return bound_member<RT,ClassT>(obj, fptr);
1.2736 +#endif
1.2737 +}
1.2738 +
1.2739 +template <typename RT, typename ClassT>
1.2740 +inline bound_member<RT,ClassT const>
1.2741 +bind(ClassT const& obj, RT(ClassT::*fptr)())
1.2742 +{
1.2743 + return bound_member<RT,ClassT const>(obj, fptr);
1.2744 +}
1.2745 +
1.2746 +template <typename RT, typename ClassT>
1.2747 +inline bound_member<RT,ClassT const>
1.2748 +bind(ClassT const* obj, RT(ClassT::*fptr)() const)
1.2749 +{
1.2750 +#if defined(__MWERKS__) && (__MWERKS__ < 0x3003)
1.2751 + return bound_member<RT,ClassT const>(*obj, fptr);
1.2752 +#else
1.2753 + return bound_member<RT,ClassT const>(obj, fptr);
1.2754 +#endif
1.2755 +}
1.2756 +
1.2757 +///////////////////////////////////////////////////////////////////////////////
1.2758 +//
1.2759 +// Bound member function binder (specialization for 1 arg)
1.2760 +//
1.2761 +///////////////////////////////////////////////////////////////////////////////
1.2762 +template <typename RT, typename ClassT, typename A>
1.2763 +struct bound_member_action<RT, ClassT,
1.2764 + A, nil_t, nil_t,
1.2765 +#if PHOENIX_LIMIT > 3
1.2766 + nil_t, nil_t, nil_t,
1.2767 +#if PHOENIX_LIMIT > 6
1.2768 + nil_t, nil_t, nil_t,
1.2769 +#if PHOENIX_LIMIT > 9
1.2770 + nil_t, nil_t, nil_t,
1.2771 +#if PHOENIX_LIMIT > 12
1.2772 + nil_t, nil_t, nil_t,
1.2773 +#endif
1.2774 +#endif
1.2775 +#endif
1.2776 +#endif
1.2777 + nil_t // Unused
1.2778 +> {
1.2779 +
1.2780 + typedef RT result_type;
1.2781 + typedef RT(ClassT::*mf)(A);
1.2782 + typedef RT(ClassT::*cmf)(A) const;
1.2783 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.2784 + mem_func_ptr_t;
1.2785 +
1.2786 + template <typename A_>
1.2787 + struct result { typedef result_type type; };
1.2788 +
1.2789 + template <typename CT>
1.2790 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.2791 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.2792 +
1.2793 + result_type operator()(A a) const
1.2794 + { return (obj->*fptr)(a); }
1.2795 +
1.2796 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.2797 + mem_func_ptr_t fptr;
1.2798 +};
1.2799 +
1.2800 +//////////////////////////////////
1.2801 +template <typename RT, typename ClassT, typename A>
1.2802 +inline bound_member<RT, ClassT, A>
1.2803 +bind(ClassT & obj, RT(ClassT::*fptr)(A))
1.2804 +{
1.2805 + return bound_member<RT, ClassT, A>(obj,fptr);
1.2806 +}
1.2807 +
1.2808 +template <typename RT, typename ClassT, typename A>
1.2809 +inline bound_member<RT, ClassT, A>
1.2810 +bind(ClassT * obj, RT(ClassT::*fptr)(A))
1.2811 +{
1.2812 + return bound_member<RT, ClassT, A>(obj,fptr);
1.2813 +}
1.2814 +
1.2815 +//////////////////////////////////
1.2816 +template <typename RT, typename ClassT, typename A>
1.2817 +inline bound_member<RT, ClassT const, A>
1.2818 +bind(ClassT const& obj, RT(ClassT::*fptr)(A) const)
1.2819 +{
1.2820 + return bound_member<RT, ClassT const, A>(obj,fptr);
1.2821 +}
1.2822 +
1.2823 +template <typename RT, typename ClassT, typename A>
1.2824 +inline bound_member<RT, ClassT const, A>
1.2825 +bind(ClassT const* obj, RT(ClassT::*fptr)(A) const)
1.2826 +{
1.2827 + return bound_member<RT, ClassT const, A>(obj,fptr);
1.2828 +}
1.2829 +
1.2830 +///////////////////////////////////////////////////////////////////////////////
1.2831 +//
1.2832 +// Bound member function binder (specialization for 2 args)
1.2833 +//
1.2834 +///////////////////////////////////////////////////////////////////////////////
1.2835 +template <typename RT, typename ClassT, typename A, typename B>
1.2836 +struct bound_member_action<RT, ClassT,
1.2837 + A, B, nil_t,
1.2838 +#if PHOENIX_LIMIT > 3
1.2839 + nil_t, nil_t, nil_t,
1.2840 +#if PHOENIX_LIMIT > 6
1.2841 + nil_t, nil_t, nil_t,
1.2842 +#if PHOENIX_LIMIT > 9
1.2843 + nil_t, nil_t, nil_t,
1.2844 +#if PHOENIX_LIMIT > 12
1.2845 + nil_t, nil_t, nil_t,
1.2846 +#endif
1.2847 +#endif
1.2848 +#endif
1.2849 +#endif
1.2850 + nil_t // Unused
1.2851 +> {
1.2852 +
1.2853 + typedef RT result_type;
1.2854 + typedef RT(ClassT::*mf)(A, B);
1.2855 + typedef RT(ClassT::*cmf)(A, B) const;
1.2856 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.2857 + mem_func_ptr_t;
1.2858 +
1.2859 + template <typename A_, typename B_>
1.2860 + struct result { typedef result_type type; };
1.2861 +
1.2862 + template <typename CT>
1.2863 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.2864 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.2865 +
1.2866 + result_type operator()(A a, B b) const
1.2867 + { return (obj->*fptr)(a, b); }
1.2868 +
1.2869 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.2870 + mem_func_ptr_t fptr;
1.2871 +};
1.2872 +
1.2873 +//////////////////////////////////
1.2874 +template <typename RT, typename ClassT, typename A, typename B>
1.2875 +inline bound_member<RT, ClassT, A, B>
1.2876 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B))
1.2877 +{
1.2878 + return bound_member<RT, ClassT, A, B>(obj,fptr);
1.2879 +}
1.2880 +
1.2881 +template <typename RT, typename ClassT, typename A, typename B>
1.2882 +inline bound_member<RT, ClassT, A, B>
1.2883 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B))
1.2884 +{
1.2885 + return bound_member<RT, ClassT, A, B>(obj,fptr);
1.2886 +}
1.2887 +
1.2888 +template <typename RT, typename ClassT, typename A, typename B>
1.2889 +inline bound_member<RT, ClassT const, A, B>
1.2890 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B) const)
1.2891 +{
1.2892 + return bound_member<RT, ClassT const, A, B>(obj,fptr);
1.2893 +}
1.2894 +
1.2895 +template <typename RT, typename ClassT, typename A, typename B>
1.2896 +inline bound_member<RT, ClassT const, A, B>
1.2897 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B) const)
1.2898 +{
1.2899 + return bound_member<RT, ClassT const, A, B>(obj,fptr);
1.2900 +}
1.2901 +
1.2902 +#if PHOENIX_LIMIT > 3
1.2903 +///////////////////////////////////////////////////////////////////////////////
1.2904 +//
1.2905 +// Bound member function binder (specialization for 3 args)
1.2906 +//
1.2907 +///////////////////////////////////////////////////////////////////////////////
1.2908 +template <typename RT, typename ClassT, typename A, typename B, typename C>
1.2909 +struct bound_member_action<RT, ClassT,
1.2910 + A, B, C, nil_t, nil_t, nil_t,
1.2911 +#if PHOENIX_LIMIT > 6
1.2912 + nil_t, nil_t, nil_t,
1.2913 +#if PHOENIX_LIMIT > 9
1.2914 + nil_t, nil_t, nil_t,
1.2915 +#if PHOENIX_LIMIT > 12
1.2916 + nil_t, nil_t, nil_t,
1.2917 +#endif
1.2918 +#endif
1.2919 +#endif
1.2920 + nil_t // Unused
1.2921 +> {
1.2922 +
1.2923 + typedef RT result_type;
1.2924 + typedef RT(ClassT::*mf)(A, B, C);
1.2925 + typedef RT(ClassT::*cmf)(A, B, C) const;
1.2926 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.2927 + mem_func_ptr_t;
1.2928 +
1.2929 + template <typename A_, typename B_, typename C_>
1.2930 + struct result { typedef result_type type; };
1.2931 +
1.2932 + template <typename CT>
1.2933 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.2934 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.2935 +
1.2936 + result_type operator()(A a, B b, C c) const
1.2937 + { return (obj->*fptr)(a, b, c); }
1.2938 +
1.2939 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.2940 + mem_func_ptr_t fptr;
1.2941 +};
1.2942 +
1.2943 +//////////////////////////////////
1.2944 +template <typename RT, typename ClassT, typename A, typename B, typename C>
1.2945 +inline bound_member<RT, ClassT, A, B, C>
1.2946 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C))
1.2947 +{
1.2948 + return bound_member<RT, ClassT, A, B, C>(obj,fptr);
1.2949 +}
1.2950 +
1.2951 +template <typename RT, typename ClassT, typename A, typename B, typename C>
1.2952 +inline bound_member<RT, ClassT, A, B, C>
1.2953 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C))
1.2954 +{
1.2955 + return bound_member<RT, ClassT, A, B, C>(obj,fptr);
1.2956 +}
1.2957 +
1.2958 +template <typename RT, typename ClassT, typename A, typename B, typename C>
1.2959 +inline bound_member<RT, ClassT const, A, B, C>
1.2960 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C) const)
1.2961 +{
1.2962 + return bound_member<RT, ClassT const, A, B, C>(obj,fptr);
1.2963 +}
1.2964 +
1.2965 +template <typename RT, typename ClassT, typename A, typename B, typename C>
1.2966 +inline bound_member<RT, ClassT const, A, B, C>
1.2967 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C) const)
1.2968 +{
1.2969 + return bound_member<RT, ClassT const, A, B, C>(obj,fptr);
1.2970 +}
1.2971 +
1.2972 +///////////////////////////////////////////////////////////////////////////////
1.2973 +//
1.2974 +// Bound member function binder (specialization for 4 args)
1.2975 +//
1.2976 +///////////////////////////////////////////////////////////////////////////////
1.2977 +template <typename RT, typename ClassT,
1.2978 + typename A, typename B, typename C, typename D
1.2979 +>
1.2980 +struct bound_member_action<RT, ClassT,
1.2981 + A, B, C, D, nil_t, nil_t,
1.2982 +#if PHOENIX_LIMIT > 6
1.2983 + nil_t, nil_t, nil_t,
1.2984 +#if PHOENIX_LIMIT > 9
1.2985 + nil_t, nil_t, nil_t,
1.2986 +#if PHOENIX_LIMIT > 12
1.2987 + nil_t, nil_t, nil_t,
1.2988 +#endif
1.2989 +#endif
1.2990 +#endif
1.2991 + nil_t // Unused
1.2992 +> {
1.2993 +
1.2994 + typedef RT result_type;
1.2995 + typedef RT(ClassT::*mf)(A, B, C, D);
1.2996 + typedef RT(ClassT::*cmf)(A, B, C, D) const;
1.2997 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.2998 + mem_func_ptr_t;
1.2999 +
1.3000 + template <typename A_, typename B_, typename C_, typename D_>
1.3001 + struct result { typedef result_type type; };
1.3002 +
1.3003 + template <typename CT>
1.3004 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.3005 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.3006 +
1.3007 + result_type operator()(A a, B b, C c, D d) const
1.3008 + { return (obj->*fptr)(a, b, c, d); }
1.3009 +
1.3010 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.3011 + mem_func_ptr_t fptr;
1.3012 +};
1.3013 +
1.3014 +//////////////////////////////////
1.3015 +template <typename RT, typename ClassT,
1.3016 + typename A, typename B, typename C, typename D
1.3017 +>
1.3018 +inline bound_member<RT, ClassT, A, B, C, D>
1.3019 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D))
1.3020 +{
1.3021 + return bound_member<
1.3022 + RT, ClassT, A, B, C, D>(obj,fptr);
1.3023 +}
1.3024 +
1.3025 +template <typename RT, typename ClassT,
1.3026 + typename A, typename B, typename C, typename D
1.3027 +>
1.3028 +inline bound_member<RT, ClassT, A, B, C, D>
1.3029 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D))
1.3030 +{
1.3031 + return bound_member<
1.3032 + RT, ClassT, A, B, C, D>(obj,fptr);
1.3033 +}
1.3034 +
1.3035 +template <typename RT, typename ClassT,
1.3036 + typename A, typename B, typename C, typename D
1.3037 +>
1.3038 +inline bound_member<RT, ClassT const, A, B, C, D>
1.3039 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D) const)
1.3040 +{
1.3041 + return bound_member<
1.3042 + RT, ClassT const, A, B, C, D>(obj,fptr);
1.3043 +}
1.3044 +
1.3045 +template <typename RT, typename ClassT,
1.3046 + typename A, typename B, typename C, typename D
1.3047 +>
1.3048 +inline bound_member<RT, ClassT const, A, B, C, D>
1.3049 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D) const)
1.3050 +{
1.3051 + return bound_member<
1.3052 + RT, ClassT const, A, B, C, D>(obj,fptr);
1.3053 +}
1.3054 +
1.3055 +///////////////////////////////////////////////////////////////////////////////
1.3056 +//
1.3057 +// Bound member function binder (specialization for 5 args)
1.3058 +//
1.3059 +///////////////////////////////////////////////////////////////////////////////
1.3060 +template <typename RT, typename ClassT,
1.3061 + typename A, typename B, typename C, typename D,
1.3062 + typename E
1.3063 +>
1.3064 +struct bound_member_action<RT, ClassT,
1.3065 + A, B, C, D, E, nil_t,
1.3066 +#if PHOENIX_LIMIT > 6
1.3067 + nil_t, nil_t, nil_t,
1.3068 +#if PHOENIX_LIMIT > 9
1.3069 + nil_t, nil_t, nil_t,
1.3070 +#if PHOENIX_LIMIT > 12
1.3071 + nil_t, nil_t, nil_t,
1.3072 +#endif
1.3073 +#endif
1.3074 +#endif
1.3075 + nil_t // Unused
1.3076 +> {
1.3077 +
1.3078 + typedef RT result_type;
1.3079 + typedef RT(ClassT::*mf)(A, B, C, D, E);
1.3080 + typedef RT(ClassT::*cmf)(A, B, C, D, E) const;
1.3081 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.3082 + mem_func_ptr_t;
1.3083 +
1.3084 + template <typename A_, typename B_, typename C_, typename D_,
1.3085 + typename E_
1.3086 + >
1.3087 + struct result { typedef result_type type; };
1.3088 +
1.3089 + template <typename CT>
1.3090 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.3091 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.3092 +
1.3093 + result_type operator()(
1.3094 + A a, B b, C c, D d, E e
1.3095 + ) const
1.3096 + { return (obj->*fptr)(a, b, c, d, e); }
1.3097 +
1.3098 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.3099 + mem_func_ptr_t fptr;
1.3100 +};
1.3101 +
1.3102 +//////////////////////////////////
1.3103 +template <typename RT, typename ClassT,
1.3104 + typename A, typename B, typename C, typename D,
1.3105 + typename E
1.3106 +>
1.3107 +inline bound_member<RT, ClassT, A, B, C, D, E>
1.3108 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E))
1.3109 +{
1.3110 + return bound_member<
1.3111 + RT, ClassT, A, B, C, D, E>(obj,fptr);
1.3112 +}
1.3113 +
1.3114 +template <typename RT, typename ClassT,
1.3115 + typename A, typename B, typename C, typename D,
1.3116 + typename E
1.3117 +>
1.3118 +inline bound_member<RT, ClassT, A, B, C, D, E>
1.3119 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E))
1.3120 +{
1.3121 + return bound_member<
1.3122 + RT, ClassT, A, B, C, D, E>(obj,fptr);
1.3123 +}
1.3124 +
1.3125 +template <typename RT, typename ClassT,
1.3126 + typename A, typename B, typename C, typename D,
1.3127 + typename E
1.3128 +>
1.3129 +inline bound_member<RT, ClassT const, A, B, C, D, E>
1.3130 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E) const)
1.3131 +{
1.3132 + return bound_member<
1.3133 + RT, ClassT const, A, B, C, D, E>(obj,fptr);
1.3134 +}
1.3135 +
1.3136 +template <typename RT, typename ClassT,
1.3137 + typename A, typename B, typename C, typename D,
1.3138 + typename E
1.3139 +>
1.3140 +inline bound_member<RT, ClassT const, A, B, C, D, E>
1.3141 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E) const)
1.3142 +{
1.3143 + return bound_member<
1.3144 + RT, ClassT const, A, B, C, D, E>(obj,fptr);
1.3145 +}
1.3146 +
1.3147 +#if PHOENIX_LIMIT > 6
1.3148 +///////////////////////////////////////////////////////////////////////////////
1.3149 +//
1.3150 +// Bound member function binder (specialization for 6 args)
1.3151 +//
1.3152 +///////////////////////////////////////////////////////////////////////////////
1.3153 +template <typename RT, typename ClassT,
1.3154 + typename A, typename B, typename C, typename D,
1.3155 + typename E, typename F
1.3156 +>
1.3157 +struct bound_member_action<RT, ClassT,
1.3158 + A, B, C, D, E, F, nil_t, nil_t, nil_t,
1.3159 +#if PHOENIX_LIMIT > 9
1.3160 + nil_t, nil_t, nil_t,
1.3161 +#if PHOENIX_LIMIT > 12
1.3162 + nil_t, nil_t, nil_t,
1.3163 +#endif
1.3164 +#endif
1.3165 + nil_t // Unused
1.3166 +> {
1.3167 +
1.3168 + typedef RT result_type;
1.3169 + typedef RT(ClassT::*mf)(A, B, C, D, E, F);
1.3170 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F) const;
1.3171 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.3172 + mem_func_ptr_t;
1.3173 +
1.3174 + template <
1.3175 + typename A_, typename B_, typename C_, typename D_,
1.3176 + typename E_, typename F_
1.3177 + >
1.3178 + struct result { typedef result_type type; };
1.3179 +
1.3180 + template <typename CT>
1.3181 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.3182 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.3183 +
1.3184 + result_type operator()(
1.3185 + A a, B b, C c, D d, E e, F f
1.3186 + ) const
1.3187 + { return (obj->*fptr)(a, b, c, d, e, f); }
1.3188 +
1.3189 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.3190 + mem_func_ptr_t fptr;
1.3191 +};
1.3192 +
1.3193 +//////////////////////////////////
1.3194 +template <typename RT, typename ClassT,
1.3195 + typename A, typename B, typename C, typename D,
1.3196 + typename E, typename F
1.3197 +>
1.3198 +inline bound_member<RT, ClassT, A, B, C, D, E, F>
1.3199 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F))
1.3200 +{
1.3201 + return bound_member<
1.3202 + RT, ClassT, A, B, C, D, E, F>(obj,fptr);
1.3203 +}
1.3204 +
1.3205 +template <typename RT, typename ClassT,
1.3206 + typename A, typename B, typename C, typename D,
1.3207 + typename E, typename F
1.3208 +>
1.3209 +inline bound_member<RT, ClassT, A, B, C, D, E, F>
1.3210 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F))
1.3211 +{
1.3212 + return bound_member<
1.3213 + RT, ClassT, A, B, C, D, E, F>(obj,fptr);
1.3214 +}
1.3215 +
1.3216 +template <typename RT, typename ClassT,
1.3217 + typename A, typename B, typename C, typename D,
1.3218 + typename E, typename F
1.3219 +>
1.3220 +inline bound_member<RT, ClassT const, A, B, C, D, E, F>
1.3221 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F) const)
1.3222 +{
1.3223 + return bound_member<
1.3224 + RT, ClassT const, A, B, C, D, E, F>(obj,fptr);
1.3225 +}
1.3226 +
1.3227 +template <typename RT, typename ClassT,
1.3228 + typename A, typename B, typename C, typename D,
1.3229 + typename E, typename F
1.3230 +>
1.3231 +inline bound_member<RT, ClassT const, A, B, C, D, E, F>
1.3232 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F) const)
1.3233 +{
1.3234 + return bound_member<
1.3235 + RT, ClassT const, A, B, C, D, E, F>(obj,fptr);
1.3236 +}
1.3237 +
1.3238 +///////////////////////////////////////////////////////////////////////////////
1.3239 +//
1.3240 +// Bound member function binder (specialization for 7 args)
1.3241 +//
1.3242 +///////////////////////////////////////////////////////////////////////////////
1.3243 +template <typename RT, typename ClassT,
1.3244 + typename A, typename B, typename C, typename D,
1.3245 + typename E, typename F, typename G
1.3246 +>
1.3247 +struct bound_member_action<RT, ClassT,
1.3248 + A, B, C, D, E, F, G, nil_t, nil_t,
1.3249 +#if PHOENIX_LIMIT > 9
1.3250 + nil_t, nil_t, nil_t,
1.3251 +#if PHOENIX_LIMIT > 12
1.3252 + nil_t, nil_t, nil_t,
1.3253 +#endif
1.3254 +#endif
1.3255 + nil_t // Unused
1.3256 +> {
1.3257 +
1.3258 + typedef RT result_type;
1.3259 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G);
1.3260 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G) const;
1.3261 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.3262 + mem_func_ptr_t;
1.3263 +
1.3264 + template <
1.3265 + typename A_, typename B_, typename C_, typename D_,
1.3266 + typename E_, typename F_, typename G_
1.3267 + >
1.3268 + struct result { typedef result_type type; };
1.3269 +
1.3270 + template <typename CT>
1.3271 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.3272 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.3273 +
1.3274 + result_type operator()(
1.3275 + A a, B b, C c, D d, E e, F f, G g
1.3276 + ) const
1.3277 + { return (obj->*fptr)(a, b, c, d, e, f, g); }
1.3278 +
1.3279 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.3280 + mem_func_ptr_t fptr;
1.3281 +};
1.3282 +
1.3283 +//////////////////////////////////
1.3284 +template <typename RT, typename ClassT,
1.3285 + typename A, typename B, typename C, typename D,
1.3286 + typename E, typename F, typename G
1.3287 +>
1.3288 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G>
1.3289 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G))
1.3290 +{
1.3291 + return bound_member<
1.3292 + RT, ClassT, A, B, C, D, E, F, G>(obj,fptr);
1.3293 +}
1.3294 +
1.3295 +template <typename RT, typename ClassT,
1.3296 + typename A, typename B, typename C, typename D,
1.3297 + typename E, typename F, typename G
1.3298 +>
1.3299 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G>
1.3300 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G))
1.3301 +{
1.3302 + return bound_member<
1.3303 + RT, ClassT, A, B, C, D, E, F, G>(obj,fptr);
1.3304 +}
1.3305 +
1.3306 +template <typename RT, typename ClassT,
1.3307 + typename A, typename B, typename C, typename D,
1.3308 + typename E, typename F, typename G
1.3309 +>
1.3310 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G>
1.3311 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G) const)
1.3312 +{
1.3313 + return bound_member<
1.3314 + RT, ClassT const, A, B, C, D, E, F, G>(obj,fptr);
1.3315 +}
1.3316 +
1.3317 +template <typename RT, typename ClassT,
1.3318 + typename A, typename B, typename C, typename D,
1.3319 + typename E, typename F, typename G
1.3320 +>
1.3321 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G>
1.3322 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G) const)
1.3323 +{
1.3324 + return bound_member<
1.3325 + RT, ClassT const, A, B, C, D, E, F, G>(obj,fptr);
1.3326 +}
1.3327 +
1.3328 +///////////////////////////////////////////////////////////////////////////////
1.3329 +//
1.3330 +// Bound member function binder (specialization for 8 args)
1.3331 +//
1.3332 +///////////////////////////////////////////////////////////////////////////////
1.3333 +template <typename RT, typename ClassT,
1.3334 + typename A, typename B, typename C, typename D,
1.3335 + typename E, typename F, typename G, typename H
1.3336 +>
1.3337 +struct bound_member_action<RT, ClassT,
1.3338 + A, B, C, D, E, F, G, H, nil_t,
1.3339 +#if PHOENIX_LIMIT > 9
1.3340 + nil_t, nil_t, nil_t,
1.3341 +#if PHOENIX_LIMIT > 12
1.3342 + nil_t, nil_t, nil_t,
1.3343 +#endif
1.3344 +#endif
1.3345 + nil_t // Unused
1.3346 +> {
1.3347 +
1.3348 + typedef RT result_type;
1.3349 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H);
1.3350 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H) const;
1.3351 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.3352 + mem_func_ptr_t;
1.3353 +
1.3354 + template <
1.3355 + typename A_, typename B_, typename C_, typename D_,
1.3356 + typename E_, typename F_, typename G_, typename H_
1.3357 + >
1.3358 + struct result { typedef result_type type; };
1.3359 +
1.3360 + template <typename CT>
1.3361 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.3362 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.3363 +
1.3364 + result_type operator()(
1.3365 + A a, B b, C c, D d, E e, F f, G g, H h
1.3366 + ) const
1.3367 + { return (obj->*fptr)(a, b, c, d, e, f, g, h); }
1.3368 +
1.3369 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.3370 + mem_func_ptr_t fptr;
1.3371 +};
1.3372 +
1.3373 +//////////////////////////////////
1.3374 +template <typename RT, typename ClassT,
1.3375 + typename A, typename B, typename C, typename D,
1.3376 + typename E, typename F, typename G, typename H
1.3377 +>
1.3378 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H>
1.3379 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H))
1.3380 +{
1.3381 + return bound_member<
1.3382 + RT, ClassT, A, B, C, D, E, F, G, H>(obj,fptr);
1.3383 +}
1.3384 +
1.3385 +template <typename RT, typename ClassT,
1.3386 + typename A, typename B, typename C, typename D,
1.3387 + typename E, typename F, typename G, typename H
1.3388 +>
1.3389 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H>
1.3390 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H))
1.3391 +{
1.3392 + return bound_member<
1.3393 + RT, ClassT, A, B, C, D, E, F, G, H>(obj,fptr);
1.3394 +}
1.3395 +
1.3396 +template <typename RT, typename ClassT,
1.3397 + typename A, typename B, typename C, typename D,
1.3398 + typename E, typename F, typename G, typename H
1.3399 +>
1.3400 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H>
1.3401 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H) const)
1.3402 +{
1.3403 + return bound_member<
1.3404 + RT, ClassT const, A, B, C, D, E, F, G, H>(obj,fptr);
1.3405 +}
1.3406 +
1.3407 +template <typename RT, typename ClassT,
1.3408 + typename A, typename B, typename C, typename D,
1.3409 + typename E, typename F, typename G, typename H
1.3410 +>
1.3411 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H>
1.3412 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H) const)
1.3413 +{
1.3414 + return bound_member<
1.3415 + RT, ClassT const, A, B, C, D, E, F, G, H>(obj,fptr);
1.3416 +}
1.3417 +
1.3418 +#if PHOENIX_LIMIT > 9
1.3419 +///////////////////////////////////////////////////////////////////////////////
1.3420 +//
1.3421 +// Bound member function binder (specialization for 9 args)
1.3422 +//
1.3423 +///////////////////////////////////////////////////////////////////////////////
1.3424 +template <typename RT, typename ClassT,
1.3425 + typename A, typename B, typename C, typename D,
1.3426 + typename E, typename F, typename G, typename H, typename I
1.3427 +>
1.3428 +struct bound_member_action<RT, ClassT,
1.3429 + A, B, C, D, E, F, G, H, I, nil_t, nil_t, nil_t,
1.3430 +#if PHOENIX_LIMIT > 12
1.3431 + nil_t, nil_t, nil_t,
1.3432 +#endif
1.3433 + nil_t // Unused
1.3434 +> {
1.3435 +
1.3436 + typedef RT result_type;
1.3437 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I);
1.3438 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I) const;
1.3439 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.3440 + mem_func_ptr_t;
1.3441 +
1.3442 + template <
1.3443 + typename A_, typename B_, typename C_, typename D_,
1.3444 + typename E_, typename F_, typename G_, typename H_, typename I_
1.3445 + >
1.3446 + struct result { typedef result_type type; };
1.3447 +
1.3448 + template <typename CT>
1.3449 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.3450 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.3451 +
1.3452 + result_type operator()(
1.3453 + A a, B b, C c, D d, E e, F f, G g, H h, I i
1.3454 + ) const
1.3455 + { return (obj->*fptr)(a, b, c, d, e, f, g, h, i); }
1.3456 +
1.3457 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.3458 + mem_func_ptr_t fptr;
1.3459 +};
1.3460 +
1.3461 +//////////////////////////////////
1.3462 +template <typename RT, typename ClassT,
1.3463 + typename A, typename B, typename C, typename D,
1.3464 + typename E, typename F, typename G, typename H, typename I
1.3465 +>
1.3466 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I>
1.3467 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I))
1.3468 +{
1.3469 + return bound_member<
1.3470 + RT, ClassT, A, B, C, D, E, F, G, H, I>(obj,fptr);
1.3471 +}
1.3472 +
1.3473 +template <typename RT, typename ClassT,
1.3474 + typename A, typename B, typename C, typename D,
1.3475 + typename E, typename F, typename G, typename H, typename I
1.3476 +>
1.3477 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I>
1.3478 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I))
1.3479 +{
1.3480 + return bound_member<
1.3481 + RT, ClassT, A, B, C, D, E, F, G, H, I>(obj,fptr);
1.3482 +}
1.3483 +
1.3484 +template <typename RT, typename ClassT,
1.3485 + typename A, typename B, typename C, typename D,
1.3486 + typename E, typename F, typename G, typename H, typename I
1.3487 +>
1.3488 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I>
1.3489 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I) const)
1.3490 +{
1.3491 + return bound_member<
1.3492 + RT, ClassT const, A, B, C, D, E, F, G, H, I>(obj,fptr);
1.3493 +}
1.3494 +
1.3495 +template <typename RT, typename ClassT,
1.3496 + typename A, typename B, typename C, typename D,
1.3497 + typename E, typename F, typename G, typename H, typename I
1.3498 +>
1.3499 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I>
1.3500 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I) const)
1.3501 +{
1.3502 + return bound_member<
1.3503 + RT, ClassT const, A, B, C, D, E, F, G, H, I>(obj,fptr);
1.3504 +}
1.3505 +
1.3506 +///////////////////////////////////////////////////////////////////////////////
1.3507 +//
1.3508 +// Bound member function binder (specialization for 10 args)
1.3509 +//
1.3510 +///////////////////////////////////////////////////////////////////////////////
1.3511 +template <typename RT, typename ClassT,
1.3512 + typename A, typename B, typename C, typename D,
1.3513 + typename E, typename F, typename G, typename H, typename I,
1.3514 + typename J
1.3515 +>
1.3516 +struct bound_member_action<RT, ClassT,
1.3517 + A, B, C, D, E, F, G, H, I, J, nil_t, nil_t,
1.3518 +#if PHOENIX_LIMIT > 12
1.3519 + nil_t, nil_t, nil_t,
1.3520 +#endif
1.3521 + nil_t // Unused
1.3522 +> {
1.3523 +
1.3524 + typedef RT result_type;
1.3525 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J);
1.3526 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J) const;
1.3527 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.3528 + mem_func_ptr_t;
1.3529 +
1.3530 + template <
1.3531 + typename A_, typename B_, typename C_, typename D_,
1.3532 + typename E_, typename F_, typename G_, typename H_, typename I_,
1.3533 + typename J_
1.3534 + >
1.3535 + struct result { typedef result_type type; };
1.3536 +
1.3537 + template <typename CT>
1.3538 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.3539 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.3540 +
1.3541 + result_type operator()(
1.3542 + A a, B b, C c, D d, E e, F f, G g, H h, I i, J j
1.3543 + ) const
1.3544 + {
1.3545 + return (obj->*fptr)(a, b, c, d, e, f, g, h, i, j);
1.3546 + }
1.3547 +
1.3548 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.3549 + mem_func_ptr_t fptr;
1.3550 +};
1.3551 +
1.3552 +//////////////////////////////////
1.3553 +template <typename RT, typename ClassT,
1.3554 + typename A, typename B, typename C, typename D,
1.3555 + typename E, typename F, typename G, typename H, typename I,
1.3556 + typename J
1.3557 +>
1.3558 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J>
1.3559 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J))
1.3560 +{
1.3561 + return bound_member<
1.3562 + RT, ClassT, A, B, C, D, E, F, G, H, I, J>(obj,fptr);
1.3563 +}
1.3564 +
1.3565 +template <typename RT, typename ClassT,
1.3566 + typename A, typename B, typename C, typename D,
1.3567 + typename E, typename F, typename G, typename H, typename I,
1.3568 + typename J
1.3569 +>
1.3570 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J>
1.3571 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J))
1.3572 +{
1.3573 + return bound_member<
1.3574 + RT, ClassT, A, B, C, D, E, F, G, H, I, J>(obj,fptr);
1.3575 +}
1.3576 +
1.3577 +template <typename RT, typename ClassT,
1.3578 + typename A, typename B, typename C, typename D,
1.3579 + typename E, typename F, typename G, typename H, typename I,
1.3580 + typename J
1.3581 +>
1.3582 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J>
1.3583 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J) const)
1.3584 +{
1.3585 + return bound_member<
1.3586 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J>(obj,fptr);
1.3587 +}
1.3588 +
1.3589 +template <typename RT, typename ClassT,
1.3590 + typename A, typename B, typename C, typename D,
1.3591 + typename E, typename F, typename G, typename H, typename I,
1.3592 + typename J
1.3593 +>
1.3594 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J>
1.3595 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J) const)
1.3596 +{
1.3597 + return bound_member<
1.3598 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J>(obj,fptr);
1.3599 +}
1.3600 +
1.3601 +///////////////////////////////////////////////////////////////////////////////
1.3602 +//
1.3603 +// Bound member function binder (specialization for 11 args)
1.3604 +//
1.3605 +///////////////////////////////////////////////////////////////////////////////
1.3606 +template <typename RT, typename ClassT,
1.3607 + typename A, typename B, typename C, typename D,
1.3608 + typename E, typename F, typename G, typename H, typename I,
1.3609 + typename J, typename K
1.3610 +>
1.3611 +struct bound_member_action<RT, ClassT,
1.3612 + A, B, C, D, E, F, G, H, I, J, K, nil_t,
1.3613 +#if PHOENIX_LIMIT > 12
1.3614 + nil_t, nil_t, nil_t,
1.3615 +#endif
1.3616 + nil_t // Unused
1.3617 +> {
1.3618 +
1.3619 + typedef RT result_type;
1.3620 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K);
1.3621 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K) const;
1.3622 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.3623 + mem_func_ptr_t;
1.3624 +
1.3625 + template <
1.3626 + typename A_, typename B_, typename C_, typename D_,
1.3627 + typename E_, typename F_, typename G_, typename H_, typename I_,
1.3628 + typename J_, typename K_
1.3629 + >
1.3630 + struct result { typedef result_type type; };
1.3631 +
1.3632 + template <typename CT>
1.3633 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.3634 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.3635 +
1.3636 + result_type operator()(
1.3637 + A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k
1.3638 + ) const
1.3639 + {
1.3640 + return (obj->*fptr)(a, b, c, d, e, f, g, h, i, j, k);
1.3641 + }
1.3642 +
1.3643 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.3644 + mem_func_ptr_t fptr;
1.3645 +};
1.3646 +
1.3647 +//////////////////////////////////
1.3648 +template <typename RT, typename ClassT,
1.3649 + typename A, typename B, typename C, typename D,
1.3650 + typename E, typename F, typename G, typename H, typename I,
1.3651 + typename J, typename K
1.3652 +>
1.3653 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K>
1.3654 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K))
1.3655 +{
1.3656 + return bound_member<
1.3657 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K>(obj,fptr);
1.3658 +}
1.3659 +
1.3660 +template <typename RT, typename ClassT,
1.3661 + typename A, typename B, typename C, typename D,
1.3662 + typename E, typename F, typename G, typename H, typename I,
1.3663 + typename J, typename K
1.3664 +>
1.3665 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K>
1.3666 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K))
1.3667 +{
1.3668 + return bound_member<
1.3669 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K>(obj,fptr);
1.3670 +}
1.3671 +
1.3672 +template <typename RT, typename ClassT,
1.3673 + typename A, typename B, typename C, typename D,
1.3674 + typename E, typename F, typename G, typename H, typename I,
1.3675 + typename J, typename K
1.3676 +>
1.3677 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K>
1.3678 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K) const)
1.3679 +{
1.3680 + return bound_member<
1.3681 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K>(obj,fptr);
1.3682 +}
1.3683 +
1.3684 +template <typename RT, typename ClassT,
1.3685 + typename A, typename B, typename C, typename D,
1.3686 + typename E, typename F, typename G, typename H, typename I,
1.3687 + typename J, typename K
1.3688 +>
1.3689 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K>
1.3690 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K) const)
1.3691 +{
1.3692 + return bound_member<
1.3693 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K>(obj,fptr);
1.3694 +}
1.3695 +
1.3696 +#if PHOENIX_LIMIT > 12
1.3697 +///////////////////////////////////////////////////////////////////////////////
1.3698 +//
1.3699 +// Bound member function binder (specialization for 12 args)
1.3700 +//
1.3701 +///////////////////////////////////////////////////////////////////////////////
1.3702 +template <typename RT, typename ClassT,
1.3703 + typename A, typename B, typename C, typename D,
1.3704 + typename E, typename F, typename G, typename H, typename I,
1.3705 + typename J, typename K, typename L
1.3706 +>
1.3707 +struct bound_member_action<RT, ClassT,
1.3708 + A, B, C, D, E, F, G, H, I, J, K, L, nil_t, nil_t, nil_t, nil_t> {
1.3709 +
1.3710 + typedef RT result_type;
1.3711 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L);
1.3712 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L) const;
1.3713 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.3714 + mem_func_ptr_t;
1.3715 +
1.3716 + template <
1.3717 + typename A_, typename B_, typename C_, typename D_,
1.3718 + typename E_, typename F_, typename G_, typename H_, typename I_,
1.3719 + typename J_, typename K_, typename L_
1.3720 + >
1.3721 + struct result { typedef result_type type; };
1.3722 +
1.3723 + template <typename CT>
1.3724 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.3725 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.3726 +
1.3727 + result_type operator()(
1.3728 + A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l
1.3729 + ) const
1.3730 + {
1.3731 + return (obj->*fptr)(a, b, c, d, e, f, g, h, i, j, k, l);
1.3732 + }
1.3733 +
1.3734 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.3735 + mem_func_ptr_t fptr;
1.3736 +};
1.3737 +
1.3738 +//////////////////////////////////
1.3739 +template <typename RT, typename ClassT,
1.3740 + typename A, typename B, typename C, typename D,
1.3741 + typename E, typename F, typename G, typename H, typename I,
1.3742 + typename J, typename K, typename L
1.3743 +>
1.3744 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L>
1.3745 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L))
1.3746 +{
1.3747 + return bound_member<
1.3748 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L>(obj,fptr);
1.3749 +}
1.3750 +
1.3751 +template <typename RT, typename ClassT,
1.3752 + typename A, typename B, typename C, typename D,
1.3753 + typename E, typename F, typename G, typename H, typename I,
1.3754 + typename J, typename K, typename L
1.3755 +>
1.3756 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L>
1.3757 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L))
1.3758 +{
1.3759 + return bound_member<
1.3760 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L>(obj,fptr);
1.3761 +}
1.3762 +
1.3763 +template <typename RT, typename ClassT,
1.3764 + typename A, typename B, typename C, typename D,
1.3765 + typename E, typename F, typename G, typename H, typename I,
1.3766 + typename J, typename K, typename L
1.3767 +>
1.3768 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L>
1.3769 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L) const)
1.3770 +{
1.3771 + return bound_member<
1.3772 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L>(obj,fptr);
1.3773 +}
1.3774 +
1.3775 +template <typename RT, typename ClassT,
1.3776 + typename A, typename B, typename C, typename D,
1.3777 + typename E, typename F, typename G, typename H, typename I,
1.3778 + typename J, typename K, typename L
1.3779 +>
1.3780 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L>
1.3781 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L) const)
1.3782 +{
1.3783 + return bound_member<
1.3784 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L>(obj,fptr);
1.3785 +}
1.3786 +
1.3787 +///////////////////////////////////////////////////////////////////////////////
1.3788 +//
1.3789 +// Bound member function binder (specialization for 13 args)
1.3790 +//
1.3791 +///////////////////////////////////////////////////////////////////////////////
1.3792 +template <typename RT, typename ClassT,
1.3793 + typename A, typename B, typename C, typename D,
1.3794 + typename E, typename F, typename G, typename H, typename I,
1.3795 + typename J, typename K, typename L, typename M
1.3796 +>
1.3797 +struct bound_member_action<RT, ClassT,
1.3798 + A, B, C, D, E, F, G, H, I, J, K, L, M, nil_t, nil_t, nil_t> {
1.3799 +
1.3800 + typedef RT result_type;
1.3801 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L, M);
1.3802 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L, M) const;
1.3803 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.3804 + mem_func_ptr_t;
1.3805 +
1.3806 + template <
1.3807 + typename A_, typename B_, typename C_, typename D_,
1.3808 + typename E_, typename F_, typename G_, typename H_, typename I_,
1.3809 + typename J_, typename K_, typename L_, typename M_
1.3810 + >
1.3811 + struct result { typedef result_type type; };
1.3812 +
1.3813 + template <typename CT>
1.3814 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.3815 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.3816 +
1.3817 + result_type operator()(
1.3818 + A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m
1.3819 + ) const
1.3820 + {
1.3821 + return (obj->*fptr)(a, b, c, d, e, f, g, h, i, j, k, l, m);
1.3822 + }
1.3823 +
1.3824 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.3825 + mem_func_ptr_t fptr;
1.3826 +};
1.3827 +
1.3828 +//////////////////////////////////
1.3829 +template <typename RT, typename ClassT,
1.3830 + typename A, typename B, typename C, typename D,
1.3831 + typename E, typename F, typename G, typename H, typename I,
1.3832 + typename J, typename K, typename L, typename M
1.3833 +>
1.3834 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M>
1.3835 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M))
1.3836 +{
1.3837 + return bound_member<
1.3838 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M>(obj,fptr);
1.3839 +}
1.3840 +
1.3841 +template <typename RT, typename ClassT,
1.3842 + typename A, typename B, typename C, typename D,
1.3843 + typename E, typename F, typename G, typename H, typename I,
1.3844 + typename J, typename K, typename L, typename M
1.3845 +>
1.3846 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M>
1.3847 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M))
1.3848 +{
1.3849 + return bound_member<
1.3850 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M>(obj,fptr);
1.3851 +}
1.3852 +
1.3853 +template <typename RT, typename ClassT,
1.3854 + typename A, typename B, typename C, typename D,
1.3855 + typename E, typename F, typename G, typename H, typename I,
1.3856 + typename J, typename K, typename L, typename M
1.3857 +>
1.3858 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M>
1.3859 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M) const)
1.3860 +{
1.3861 + return bound_member<
1.3862 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M>(obj,fptr);
1.3863 +}
1.3864 +
1.3865 +template <typename RT, typename ClassT,
1.3866 + typename A, typename B, typename C, typename D,
1.3867 + typename E, typename F, typename G, typename H, typename I,
1.3868 + typename J, typename K, typename L, typename M
1.3869 +>
1.3870 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M>
1.3871 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M) const)
1.3872 +{
1.3873 + return bound_member<
1.3874 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M>(obj,fptr);
1.3875 +}
1.3876 +
1.3877 +///////////////////////////////////////////////////////////////////////////////
1.3878 +//
1.3879 +// Bound member function binder (specialization for 14 args)
1.3880 +//
1.3881 +///////////////////////////////////////////////////////////////////////////////
1.3882 +template <typename RT, typename ClassT,
1.3883 + typename A, typename B, typename C, typename D,
1.3884 + typename E, typename F, typename G, typename H, typename I,
1.3885 + typename J, typename K, typename L, typename M, typename N
1.3886 +>
1.3887 +struct bound_member_action<RT, ClassT,
1.3888 + A, B, C, D, E, F, G, H, I, J, K, L, M, N, nil_t, nil_t> {
1.3889 +
1.3890 + typedef RT result_type;
1.3891 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N);
1.3892 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N) const;
1.3893 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.3894 + mem_func_ptr_t;
1.3895 +
1.3896 + template <
1.3897 + typename A_, typename B_, typename C_, typename D_,
1.3898 + typename E_, typename F_, typename G_, typename H_, typename I_,
1.3899 + typename J_, typename K_, typename L_, typename M_, typename N_
1.3900 + >
1.3901 + struct result { typedef result_type type; };
1.3902 +
1.3903 + template <typename CT>
1.3904 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.3905 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.3906 +
1.3907 + result_type operator()(
1.3908 + A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n
1.3909 + ) const
1.3910 + {
1.3911 + return (obj->*fptr)(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
1.3912 + }
1.3913 +
1.3914 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.3915 + mem_func_ptr_t fptr;
1.3916 +};
1.3917 +
1.3918 +//////////////////////////////////
1.3919 +template <typename RT, typename ClassT,
1.3920 + typename A, typename B, typename C, typename D,
1.3921 + typename E, typename F, typename G, typename H, typename I,
1.3922 + typename J, typename K, typename L, typename M, typename N
1.3923 +>
1.3924 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
1.3925 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N))
1.3926 +{
1.3927 + return bound_member<
1.3928 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(obj,fptr);
1.3929 +}
1.3930 +
1.3931 +template <typename RT, typename ClassT,
1.3932 + typename A, typename B, typename C, typename D,
1.3933 + typename E, typename F, typename G, typename H, typename I,
1.3934 + typename J, typename K, typename L, typename M, typename N
1.3935 +>
1.3936 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
1.3937 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N))
1.3938 +{
1.3939 + return bound_member<
1.3940 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(obj,fptr);
1.3941 +}
1.3942 +
1.3943 +template <typename RT, typename ClassT,
1.3944 + typename A, typename B, typename C, typename D,
1.3945 + typename E, typename F, typename G, typename H, typename I,
1.3946 + typename J, typename K, typename L, typename M, typename N
1.3947 +>
1.3948 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
1.3949 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N) const)
1.3950 +{
1.3951 + return bound_member<
1.3952 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(obj,fptr);
1.3953 +}
1.3954 +
1.3955 +template <typename RT, typename ClassT,
1.3956 + typename A, typename B, typename C, typename D,
1.3957 + typename E, typename F, typename G, typename H, typename I,
1.3958 + typename J, typename K, typename L, typename M, typename N
1.3959 +>
1.3960 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N>
1.3961 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N) const)
1.3962 +{
1.3963 + return bound_member<
1.3964 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N>(obj,fptr);
1.3965 +}
1.3966 +
1.3967 +///////////////////////////////////////////////////////////////////////////////
1.3968 +//
1.3969 +// Bound member function binder (specialization for 15 args)
1.3970 +//
1.3971 +///////////////////////////////////////////////////////////////////////////////
1.3972 +template <typename RT, typename ClassT,
1.3973 + typename A, typename B, typename C, typename D,
1.3974 + typename E, typename F, typename G, typename H, typename I,
1.3975 + typename J, typename K, typename L, typename M, typename N,
1.3976 + typename O
1.3977 +>
1.3978 +struct bound_member_action<RT, ClassT,
1.3979 + A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, nil_t> {
1.3980 +
1.3981 + typedef RT result_type;
1.3982 + typedef RT(ClassT::*mf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O);
1.3983 + typedef RT(ClassT::*cmf)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) const;
1.3984 + typedef typename boost::mpl::if_<boost::is_const<ClassT>, cmf, mf>::type
1.3985 + mem_func_ptr_t;
1.3986 +
1.3987 + template <
1.3988 + typename A_, typename B_, typename C_, typename D_,
1.3989 + typename E_, typename F_, typename G_, typename H_, typename I_,
1.3990 + typename J_, typename K_, typename L_, typename M_, typename N_,
1.3991 + typename O_
1.3992 + >
1.3993 + struct result { typedef result_type type; };
1.3994 +
1.3995 + template <typename CT>
1.3996 + bound_member_action(CT & obj_, mem_func_ptr_t fptr_)
1.3997 + : obj(impl::as_ptr<CT>::get(obj_)), fptr(fptr_) {}
1.3998 +
1.3999 + result_type operator()(
1.4000 + A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o
1.4001 + ) const
1.4002 + {
1.4003 + return (obj->*fptr)(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
1.4004 + }
1.4005 +
1.4006 + typename impl::as_ptr<ClassT>::pointer_type obj;
1.4007 + mem_func_ptr_t fptr;
1.4008 +};
1.4009 +
1.4010 +//////////////////////////////////
1.4011 +template <typename RT, typename ClassT,
1.4012 + typename A, typename B, typename C, typename D,
1.4013 + typename E, typename F, typename G, typename H, typename I,
1.4014 + typename J, typename K, typename L, typename M, typename N,
1.4015 + typename O
1.4016 +>
1.4017 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
1.4018 +bind(ClassT & obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O))
1.4019 +{
1.4020 + return bound_member<
1.4021 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(obj,fptr);
1.4022 +}
1.4023 +
1.4024 +template <typename RT, typename ClassT,
1.4025 + typename A, typename B, typename C, typename D,
1.4026 + typename E, typename F, typename G, typename H, typename I,
1.4027 + typename J, typename K, typename L, typename M, typename N,
1.4028 + typename O
1.4029 +>
1.4030 +inline bound_member<RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
1.4031 +bind(ClassT * obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O))
1.4032 +{
1.4033 + return bound_member<
1.4034 + RT, ClassT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(obj,fptr);
1.4035 +}
1.4036 +
1.4037 +template <typename RT, typename ClassT,
1.4038 + typename A, typename B, typename C, typename D,
1.4039 + typename E, typename F, typename G, typename H, typename I,
1.4040 + typename J, typename K, typename L, typename M, typename N,
1.4041 + typename O
1.4042 +>
1.4043 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
1.4044 +bind(ClassT const& obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) const)
1.4045 +{
1.4046 + return bound_member<
1.4047 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(obj,fptr);
1.4048 +}
1.4049 +
1.4050 +template <typename RT, typename ClassT,
1.4051 + typename A, typename B, typename C, typename D,
1.4052 + typename E, typename F, typename G, typename H, typename I,
1.4053 + typename J, typename K, typename L, typename M, typename N,
1.4054 + typename O
1.4055 +>
1.4056 +inline bound_member<RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>
1.4057 +bind(ClassT const* obj,RT(ClassT::*fptr)(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) const)
1.4058 +{
1.4059 + return bound_member<
1.4060 + RT, ClassT const, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(obj,fptr);
1.4061 +}
1.4062 +
1.4063 +#endif
1.4064 +#endif
1.4065 +#endif
1.4066 +#endif
1.4067 +
1.4068 +} // namespace phoenix
1.4069 +
1.4070 +#endif