typedef bool (*my_function_f)(int, double);
typedef bool (__stdcall *my_function_f2)(int, double);
// ^^^^^^^^^
template class TFunction;
tem
No, this is by design. The calling convention is very much part of the function declaration, your template function uses the default calling convention. Which is not __stdcall unless you compile with /Gz. The default is /Gd, __cdecl.
The code compiles when you target x64 because it blissfully has only one calling convention.
Fix:
template
class TFunction
{
// etc..
};