此浏览器不再受支持。
请升级到 Microsoft Edge 以使用最新的功能、安全更新和技术支持。
“declaration1”和“declaration2”具有不同的返回类型
函数模板专用化的返回类型不同于主函数模板的返回类型。
以下示例生成 C2785:
// C2785.cpp // compile with: /c template<class T> void f(T); template<> int f(int); // C2785 template<> void f(int); // OK
此页面是否有帮助?