'function': 強制インスタンス化に合致するように定義された関数テンプレートはありません
注釈
宣言されていない関数テンプレートをインスタンス化することはできません。
Example
次の例では C4667 が発生します。
// C4667a.cpp
// compile with: /LD /W1
template
void max(const int &, const int &); // C4667 expected
この警告を回避するには、まず関数テンプレートを宣言します:
// C4667b.cpp
// compile with: /LD
// Declare the function template
template<typename T>
const T &max(const T &a, const T &b) {
return (a > b) ? a : b;
}
// Then forcibly instantiate it with a desired type ... i.e. 'int'
//
template
const int &max(const int &, const int &);