bind(R (FD_STDCALL_ U::*mfn)(FD_TARGS(N)) const, T & obj, ...) { // to prevent non-const member function call on const object FD_PARAM_TYPE_CHK_OBJ_REF(U const *, obj); return FD_JOIN(delegate,N)<R FD_COMMA FD_TARGS(N)>(mfn, obj); }
bind(R (FD_STDCALL_ U::*mfn)(FD_TARGS(N)), T * obj, ...) { // to prevent non-const member function call on const object FD_PARAM_TYPE_CHK_OBJ_PTR(U *, obj); return FD_JOIN(delegate,N)<R FD_COMMA FD_TARGS(N)>(mfn, get_pointer(obj)); }
make_delegate(R (U::*mfn)(FD_FPARMS(N)), T & obj) { // to prevent non-const member function call on const object FD_PARAM_TYPE_CHK_OBJ_REF(U *, obj); return FD_JOIN(delegate,N)<R FD_COMMA FD_TARGS(N)>(mfn, obj); }
make_delegate(T *, R (FD_CDECL_ U::*mfn)(FD_FPARMS_SP(N))) { // to prevent non-const member function call on const object FD_PARAM_TYPE_CHK(U *, T *); return FD_JOIN(delegate,N)<R, T * FD_COMMA_SP FD_TARGS_SP(N)>(mfn); }
make_delegate(R (FD_CDECL_ U::*mfn)(FD_FPARMS(N)) const, T * obj) { // to prevent non-const member function call on const object FD_PARAM_TYPE_CHK_OBJ_PTR(U const *, obj); return FD_JOIN(delegate,N)<R FD_COMMA FD_TARGS(N)>(mfn, get_pointer(obj)); }
make_delegate(T *, R (FD_CDECL_ U::*mfn)(FD_FPARMS_SP(N)) const) { FD_PARAM_TYPE_CHK(U const *, T *); return FD_JOIN(delegate,N)<R, T * FD_COMMA_SP FD_TARGS_SP(N)>(mfn); }
make_delegate(R (*fn)(FD_TARGS(N))) { return FD_JOIN(delegate,N)<R FD_COMMA FD_TARGS(N)>(fn); }