I want to know if it's possible to create a template function and then create a function pointer that points to that template function. Is this possible?
I'm using VS2008.
The following code gets this compile time error:
"cannot convert from 'overloaded-function' to 'int (__cdecl *)(int &,int &)' None of the functions with this name in scope match the target type"
template<typename T>
T tfunc(const T &x, const T &y){
return (x < y ? x : y);
}
int (*tfunc_ptr)(int &, int &) = &tfunc<int>;