नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'declaration' : template parameter 'identifier' is ambiguous
Remarks
The compiler cannot determine the type of a template argument.
Examples
The following example generates C2782:
// C2782.cpp
template<typename T>
void f(T, T) {}
int main() {
f(1, 'c'); // C2782
// try the following line instead
// f<int>(1, 'c');
}
C2782 can also occur when using generics:
// C2782b.cpp
// compile with: /clr
generic<typename T> void gf(T, T) { }
int main() {
gf(1, 'c'); // C2782
// try the following line instead
// gf<int>(1, 'c');
}