次の方法で共有


コンパイラ エラー 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