编译器错误 C2909

“identifier”:函数模板的显式实例化需要返回类型

函数模板的显式实例化需要显式指定返回类型。 隐式返回类型指定不起作用。

下面的示例生成 C2909:

// C2909.cpp
// compile with: /c
template<class T> int f(T);
template f<int>(int);         // C2909
template int f<int>(int);   // OK