typedef bool (*my_function_f)(int, double);
typedef bool (__stdcall *my_function_f2)(int, double);
// ^^^^^^^^^
template class TFunction;
tem
This is because (*) means default calling convention, which is __cdecl
.
template
class TFunction
{
typedef R (*func_type)(T0,T1);
};
is actually equal to
template
class TFunction
{
typedef R (__cdecl *func_type)(T0,T1);
};
which, of course, will not match an R(__stdcall *)(T0, T1)
on Win32 where __stdcall
is not ignored. If you want to partially specialize for function pointers then you will need a partial spec for every calling convention you want to accept.