제공된 템플릿 인수를 사용하여 '인스턴스화'는 'type'의 멤버 함수에 대한 명시적 인스턴스화가 아닙니다.
컴파일러가 명시적 함수 인스턴스화를 시도했음을 감지했습니다. 그러나 제공된 형식 인수는 가능한 함수와 일치하지 않습니다.
다음 샘플에서는 C3190을 생성합니다.
// C3190.cpp
// compile with: /LD
template<class T>
struct A {
A(int x = 0) {
}
A(int x, int y) {
}
};
template A<float>::A(); // C3190
// try the following line instead
// template A<int>::A(int);
struct Y {
template<class T> void f(T);
};
template<class T> void Y::f(T) { }
template void Y::f(int,int); // C3190
template<class OT> class X {
template<class T> void f2(T,OT);
};
template<class OT> template<class T> void X<OT>::f2(T,OT) {}
template void X<float>::f2<int>(int,char); // C3190
// try one of the following lines instead
// template void X<char>::f2(int, char);
// template void X<char>::f2<int>(int,char);
// template void X<char>::f2<>(int,char);