Is it possible to have a function pointer to a template function in c++?
- by LoudNPossiblyRight
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, what's wrong with this code?
template<typename T>
T __cdecl tfunc(const T &x, const T &y){
return (x < y ? x : y);
}
int (*tfunc_ptr)(int, int) = &tfunc;