--- gvpe/src/callback.h 2003/04/02 05:14:59 1.2 +++ gvpe/src/callback.h 2007/12/02 00:54:52 1.11 @@ -1,14 +1,14 @@ -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it +// THIS IS A GENERATED FILE: RUN callback.pl to regenerate it +// THIS IS A GENERATED FILE: callback.pl is part of the GVPE +// THIS IS A GENERATED FILE: distribution. /* callback.h -- C++ callback mechanism + Copyright (C) 2003-2007 Marc Lehmann - This program is free software; you can redistribute it and/or modify + This file is part of GVPE. + + GVPE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -19,355 +19,626 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with gvpe; if not, write to the Free Software + Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef VPE_CALLBACK_H__ -#define VPE_CALLBACK_H__ +#ifndef CALLBACK_H__ +#define CALLBACK_H__ + +#define CALLBACK_H_VERSION 3 + +template +struct callback_funtype_trait; + +template +struct callback_get_impl; template -class callback0 { - struct object { }; +class callback0 +{ + struct klass; // it is vital that this is never defined - void *obj; - R (object::*meth)(); + typedef R (klass::*ptr_type)(); - /* a proxy is a kind of recipe on how to call a specific class method */ - struct proxy_base { - virtual R call (void *obj, R (object::*meth)()) = 0; - }; - template - struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)()) - { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) - (); - } - }; - - proxy_base *prxy; + klass *o; + R (klass::*m)(); public: template - callback0 (O1 *object, R (O2::*method)()) - { - static proxy p; - obj = reinterpret_cast(object); - meth = reinterpret_cast(method); - prxy = &p; - } - + explicit callback0 (O1 *object, R (O2::*method)()) + { + o = reinterpret_cast(object); + m = reinterpret_cast(method); + } + + // this works because a standards-compliant C++ compiler + // basically can't help it: it doesn't have the knowledge + // required to miscompile (klass is not defined anywhere + // and nothing is known about the constructor arguments) :) R call() const - { - return prxy->call (obj, meth); - } + { + return (o->*m) (); + } R operator ()() const - { - return call (); - } + { + return call (); + } +}; + +template +struct callback_funtype_trait0 +{ + static const int arity = 0; + typedef R type (void); + typedef R result_type; + +}; + +template +struct callback_funtype_trait : callback_funtype_trait0 +{ }; +template +struct callback_get_impl<0, signature> +{ + typedef callback_funtype_trait T; + typedef callback0 type; +}; + template -class callback1 { - struct object { }; +class callback1 +{ + struct klass; // it is vital that this is never defined - void *obj; - R (object::*meth)(A1); + typedef R (klass::*ptr_type)(A1); - /* a proxy is a kind of recipe on how to call a specific class method */ - struct proxy_base { - virtual R call (void *obj, R (object::*meth)(A1), A1 a1) = 0; - }; - template - struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)(A1), A1 a1) - { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) - (a1); - } - }; - - proxy_base *prxy; + klass *o; + R (klass::*m)(A1); public: template - callback1 (O1 *object, R (O2::*method)(A1)) - { - static proxy p; - obj = reinterpret_cast(object); - meth = reinterpret_cast(method); - prxy = &p; - } - + explicit callback1 (O1 *object, R (O2::*method)(A1)) + { + o = reinterpret_cast(object); + m = reinterpret_cast(method); + } + + // this works because a standards-compliant C++ compiler + // basically can't help it: it doesn't have the knowledge + // required to miscompile (klass is not defined anywhere + // and nothing is known about the constructor arguments) :) R call(A1 a1) const - { - return prxy->call (obj, meth, a1); - } + { + return (o->*m) (a1); + } R operator ()(A1 a1) const - { - return call (a1); - } + { + return call (a1); + } }; +template +struct callback_funtype_trait1 +{ + static const int arity = 1; + typedef R type (A1); + typedef R result_type; + typedef A1 arg1_type; +}; + +template +struct callback_funtype_trait : callback_funtype_trait1 +{ +}; + +template +struct callback_get_impl<1, signature> +{ + typedef callback_funtype_trait T; + typedef callback1 type; +}; + template -class callback2 { - struct object { }; +class callback2 +{ + struct klass; // it is vital that this is never defined - void *obj; - R (object::*meth)(A1, A2); + typedef R (klass::*ptr_type)(A1, A2); - /* a proxy is a kind of recipe on how to call a specific class method */ - struct proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) = 0; - }; - template - struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) - { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) - (a1, a2); - } - }; - - proxy_base *prxy; + klass *o; + R (klass::*m)(A1, A2); public: template - callback2 (O1 *object, R (O2::*method)(A1, A2)) - { - static proxy p; - obj = reinterpret_cast(object); - meth = reinterpret_cast(method); - prxy = &p; - } - + explicit callback2 (O1 *object, R (O2::*method)(A1, A2)) + { + o = reinterpret_cast(object); + m = reinterpret_cast(method); + } + + // this works because a standards-compliant C++ compiler + // basically can't help it: it doesn't have the knowledge + // required to miscompile (klass is not defined anywhere + // and nothing is known about the constructor arguments) :) R call(A1 a1, A2 a2) const - { - return prxy->call (obj, meth, a1, a2); - } + { + return (o->*m) (a1, a2); + } R operator ()(A1 a1, A2 a2) const - { - return call (a1, a2); - } + { + return call (a1, a2); + } +}; + +template +struct callback_funtype_trait2 +{ + static const int arity = 2; + typedef R type (A1, A2); + typedef R result_type; + typedef A1 arg1_type; typedef A2 arg2_type; +}; + +template +struct callback_funtype_trait : callback_funtype_trait2 +{ }; +template +struct callback_get_impl<2, signature> +{ + typedef callback_funtype_trait T; + typedef callback2 type; +}; + template -class callback3 { - struct object { }; +class callback3 +{ + struct klass; // it is vital that this is never defined - void *obj; - R (object::*meth)(A1, A2, A3); + typedef R (klass::*ptr_type)(A1, A2, A3); - /* a proxy is a kind of recipe on how to call a specific class method */ - struct proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) = 0; - }; - template - struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) - { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) - (a1, a2, a3); - } - }; - - proxy_base *prxy; + klass *o; + R (klass::*m)(A1, A2, A3); public: template - callback3 (O1 *object, R (O2::*method)(A1, A2, A3)) - { - static proxy p; - obj = reinterpret_cast(object); - meth = reinterpret_cast(method); - prxy = &p; - } - + explicit callback3 (O1 *object, R (O2::*method)(A1, A2, A3)) + { + o = reinterpret_cast(object); + m = reinterpret_cast(method); + } + + // this works because a standards-compliant C++ compiler + // basically can't help it: it doesn't have the knowledge + // required to miscompile (klass is not defined anywhere + // and nothing is known about the constructor arguments) :) R call(A1 a1, A2 a2, A3 a3) const - { - return prxy->call (obj, meth, a1, a2, a3); - } + { + return (o->*m) (a1, a2, a3); + } R operator ()(A1 a1, A2 a2, A3 a3) const - { - return call (a1, a2, a3); - } + { + return call (a1, a2, a3); + } +}; + +template +struct callback_funtype_trait3 +{ + static const int arity = 3; + typedef R type (A1, A2, A3); + typedef R result_type; + typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; +}; + +template +struct callback_funtype_trait : callback_funtype_trait3 +{ }; +template +struct callback_get_impl<3, signature> +{ + typedef callback_funtype_trait T; + typedef callback3 type; +}; + template -class callback4 { - struct object { }; +class callback4 +{ + struct klass; // it is vital that this is never defined - void *obj; - R (object::*meth)(A1, A2, A3, A4); + typedef R (klass::*ptr_type)(A1, A2, A3, A4); - /* a proxy is a kind of recipe on how to call a specific class method */ - struct proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) = 0; - }; - template - struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) - { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) - (a1, a2, a3, a4); - } - }; - - proxy_base *prxy; + klass *o; + R (klass::*m)(A1, A2, A3, A4); public: template - callback4 (O1 *object, R (O2::*method)(A1, A2, A3, A4)) - { - static proxy p; - obj = reinterpret_cast(object); - meth = reinterpret_cast(method); - prxy = &p; - } - + explicit callback4 (O1 *object, R (O2::*method)(A1, A2, A3, A4)) + { + o = reinterpret_cast(object); + m = reinterpret_cast(method); + } + + // this works because a standards-compliant C++ compiler + // basically can't help it: it doesn't have the knowledge + // required to miscompile (klass is not defined anywhere + // and nothing is known about the constructor arguments) :) R call(A1 a1, A2 a2, A3 a3, A4 a4) const - { - return prxy->call (obj, meth, a1, a2, a3, a4); - } + { + return (o->*m) (a1, a2, a3, a4); + } R operator ()(A1 a1, A2 a2, A3 a3, A4 a4) const - { - return call (a1, a2, a3, a4); - } + { + return call (a1, a2, a3, a4); + } }; +template +struct callback_funtype_trait4 +{ + static const int arity = 4; + typedef R type (A1, A2, A3, A4); + typedef R result_type; + typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; +}; + +template +struct callback_funtype_trait : callback_funtype_trait4 +{ +}; + +template +struct callback_get_impl<4, signature> +{ + typedef callback_funtype_trait T; + typedef callback4 type; +}; + template -class callback5 { - struct object { }; +class callback5 +{ + struct klass; // it is vital that this is never defined - void *obj; - R (object::*meth)(A1, A2, A3, A4, A5); + typedef R (klass::*ptr_type)(A1, A2, A3, A4, A5); - /* a proxy is a kind of recipe on how to call a specific class method */ - struct proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) = 0; - }; - template - struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) - { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) - (a1, a2, a3, a4, a5); - } - }; - - proxy_base *prxy; + klass *o; + R (klass::*m)(A1, A2, A3, A4, A5); public: template - callback5 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5)) - { - static proxy p; - obj = reinterpret_cast(object); - meth = reinterpret_cast(method); - prxy = &p; - } - + explicit callback5 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5)) + { + o = reinterpret_cast(object); + m = reinterpret_cast(method); + } + + // this works because a standards-compliant C++ compiler + // basically can't help it: it doesn't have the knowledge + // required to miscompile (klass is not defined anywhere + // and nothing is known about the constructor arguments) :) R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - return prxy->call (obj, meth, a1, a2, a3, a4, a5); - } + { + return (o->*m) (a1, a2, a3, a4, a5); + } R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - return call (a1, a2, a3, a4, a5); - } + { + return call (a1, a2, a3, a4, a5); + } +}; + +template +struct callback_funtype_trait5 +{ + static const int arity = 5; + typedef R type (A1, A2, A3, A4, A5); + typedef R result_type; + typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; typedef A5 arg5_type; }; +template +struct callback_funtype_trait : callback_funtype_trait5 +{ +}; + +template +struct callback_get_impl<5, signature> +{ + typedef callback_funtype_trait T; + typedef callback5 type; +}; + template -class callback6 { - struct object { }; +class callback6 +{ + struct klass; // it is vital that this is never defined - void *obj; - R (object::*meth)(A1, A2, A3, A4, A5, A6); + typedef R (klass::*ptr_type)(A1, A2, A3, A4, A5, A6); - /* a proxy is a kind of recipe on how to call a specific class method */ - struct proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) = 0; - }; - template - struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) - { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) - (a1, a2, a3, a4, a5, a6); - } - }; - - proxy_base *prxy; + klass *o; + R (klass::*m)(A1, A2, A3, A4, A5, A6); public: template - callback6 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6)) - { - static proxy p; - obj = reinterpret_cast(object); - meth = reinterpret_cast(method); - prxy = &p; - } - + explicit callback6 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6)) + { + o = reinterpret_cast(object); + m = reinterpret_cast(method); + } + + // this works because a standards-compliant C++ compiler + // basically can't help it: it doesn't have the knowledge + // required to miscompile (klass is not defined anywhere + // and nothing is known about the constructor arguments) :) R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - return prxy->call (obj, meth, a1, a2, a3, a4, a5, a6); - } + { + return (o->*m) (a1, a2, a3, a4, a5, a6); + } R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - return call (a1, a2, a3, a4, a5, a6); - } + { + return call (a1, a2, a3, a4, a5, a6); + } }; +template +struct callback_funtype_trait6 +{ + static const int arity = 6; + typedef R type (A1, A2, A3, A4, A5, A6); + typedef R result_type; + typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; typedef A5 arg5_type; typedef A6 arg6_type; +}; + +template +struct callback_funtype_trait : callback_funtype_trait6 +{ +}; + +template +struct callback_get_impl<6, signature> +{ + typedef callback_funtype_trait T; + typedef callback6 type; +}; + template -class callback7 { - struct object { }; +class callback7 +{ + struct klass; // it is vital that this is never defined - void *obj; - R (object::*meth)(A1, A2, A3, A4, A5, A6, A7); + typedef R (klass::*ptr_type)(A1, A2, A3, A4, A5, A6, A7); - /* a proxy is a kind of recipe on how to call a specific class method */ - struct proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6, A7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) = 0; - }; - template - struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6, A7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) - { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) - (a1, a2, a3, a4, a5, a6, a7); - } - }; - - proxy_base *prxy; + klass *o; + R (klass::*m)(A1, A2, A3, A4, A5, A6, A7); public: template - callback7 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7)) - { - static proxy p; - obj = reinterpret_cast(object); - meth = reinterpret_cast(method); - prxy = &p; - } - + explicit callback7 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7)) + { + o = reinterpret_cast(object); + m = reinterpret_cast(method); + } + + // this works because a standards-compliant C++ compiler + // basically can't help it: it doesn't have the knowledge + // required to miscompile (klass is not defined anywhere + // and nothing is known about the constructor arguments) :) R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - return prxy->call (obj, meth, a1, a2, a3, a4, a5, a6, a7); - } + { + return (o->*m) (a1, a2, a3, a4, a5, a6, a7); + } R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - return call (a1, a2, a3, a4, a5, a6, a7); - } + { + return call (a1, a2, a3, a4, a5, a6, a7); + } +}; + +template +struct callback_funtype_trait7 +{ + static const int arity = 7; + typedef R type (A1, A2, A3, A4, A5, A6, A7); + typedef R result_type; + typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; typedef A5 arg5_type; typedef A6 arg6_type; typedef A7 arg7_type; +}; + +template +struct callback_funtype_trait : callback_funtype_trait7 +{ +}; + +template +struct callback_get_impl<7, signature> +{ + typedef callback_funtype_trait T; + typedef callback7 type; +}; + +template +class callback8 +{ + struct klass; // it is vital that this is never defined + + typedef R (klass::*ptr_type)(A1, A2, A3, A4, A5, A6, A7, A8); + + klass *o; + R (klass::*m)(A1, A2, A3, A4, A5, A6, A7, A8); + +public: + template + explicit callback8 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7, A8)) + { + o = reinterpret_cast(object); + m = reinterpret_cast(method); + } + + // this works because a standards-compliant C++ compiler + // basically can't help it: it doesn't have the knowledge + // required to miscompile (klass is not defined anywhere + // and nothing is known about the constructor arguments) :) + R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + return (o->*m) (a1, a2, a3, a4, a5, a6, a7, a8); + } + + R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + return call (a1, a2, a3, a4, a5, a6, a7, a8); + } +}; + +template +struct callback_funtype_trait8 +{ + static const int arity = 8; + typedef R type (A1, A2, A3, A4, A5, A6, A7, A8); + typedef R result_type; + typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; typedef A5 arg5_type; typedef A6 arg6_type; typedef A7 arg7_type; typedef A8 arg8_type; +}; + +template +struct callback_funtype_trait : callback_funtype_trait8 +{ +}; + +template +struct callback_get_impl<8, signature> +{ + typedef callback_funtype_trait T; + typedef callback8 type; +}; + +template +class callback9 +{ + struct klass; // it is vital that this is never defined + + typedef R (klass::*ptr_type)(A1, A2, A3, A4, A5, A6, A7, A8, A9); + + klass *o; + R (klass::*m)(A1, A2, A3, A4, A5, A6, A7, A8, A9); + +public: + template + explicit callback9 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7, A8, A9)) + { + o = reinterpret_cast(object); + m = reinterpret_cast(method); + } + + // this works because a standards-compliant C++ compiler + // basically can't help it: it doesn't have the knowledge + // required to miscompile (klass is not defined anywhere + // and nothing is known about the constructor arguments) :) + R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) const + { + return (o->*m) (a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + + R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) const + { + return call (a1, a2, a3, a4, a5, a6, a7, a8, a9); + } +}; + +template +struct callback_funtype_trait9 +{ + static const int arity = 9; + typedef R type (A1, A2, A3, A4, A5, A6, A7, A8, A9); + typedef R result_type; + typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; typedef A5 arg5_type; typedef A6 arg6_type; typedef A7 arg7_type; typedef A8 arg8_type; typedef A9 arg9_type; +}; + +template +struct callback_funtype_trait : callback_funtype_trait9 +{ +}; + +template +struct callback_get_impl<9, signature> +{ + typedef callback_funtype_trait T; + typedef callback9 type; +}; + +template +class callback10 +{ + struct klass; // it is vital that this is never defined + + typedef R (klass::*ptr_type)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); + + klass *o; + R (klass::*m)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); + +public: + template + explicit callback10 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)) + { + o = reinterpret_cast(object); + m = reinterpret_cast(method); + } + + // this works because a standards-compliant C++ compiler + // basically can't help it: it doesn't have the knowledge + // required to miscompile (klass is not defined anywhere + // and nothing is known about the constructor arguments) :) + R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10) const + { + return (o->*m) (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); + } + + R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10) const + { + return call (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); + } +}; + +template +struct callback_funtype_trait10 +{ + static const int arity = 10; + typedef R type (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); + typedef R result_type; + typedef A1 arg1_type; typedef A2 arg2_type; typedef A3 arg3_type; typedef A4 arg4_type; typedef A5 arg5_type; typedef A6 arg6_type; typedef A7 arg7_type; typedef A8 arg8_type; typedef A9 arg9_type; typedef A10 arg10_type; +}; + +template +struct callback_funtype_trait : callback_funtype_trait10 +{ +}; + +template +struct callback_get_impl<10, signature> +{ + typedef callback_funtype_trait T; + typedef callback10 type; +}; + + +template +struct callback : callback_get_impl::arity, signature>::type +{ + typedef typename callback_get_impl::arity, signature>::type base_type; + + template + explicit callback (O object, M method) + : base_type (object, method) + { + } }; #endif