64,680
社区成员
发帖
与我相关
我的任务
分享
template<typename T>
void tem_func(int, const T&)
{
}
template<typename T>
void tem_func(double, const T&)
{
}
//无法从“overloaded-function”转换为“void (__cdecl *)(double, int)
void (*pFunc)(double, int) = tem_func<int>;
template<typename T1, typename T2>
void tem_func(T1, const T2&)
{
}
void (*pFunc)(double, int) = tem_func<double, int>;
void (*pFunc)(double, const int&) = tem_func<int>;