नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'class': type parameter 'param' is incompatible with the declaration
Remarks
The compiler found nontype template or generic parameters with different names. This can occur when a specified template parameter in the definition of a template specialization is incompatible with its declaration.
Examples
The following example generates C3855:
// C3855.cpp
template <int N>
struct C {
void f();
};
template <char N>
void C<N>::f() {} // C3855
Possible resolution:
// C3855b.cpp
// compile with: /c
template <int N>
struct C {
void f();
};
template <int N>
void C<N>::f() {}
C3855 can also occur when using generics:
// C3855c.cpp
// compile with: /clr
generic <class T>
ref struct GC1 {
generic <class U>
ref struct GC2;
};
generic <class T>
generic <class U>
generic <class V>
ref struct GC1<T>::GC2 { }; // C3855
Possible resolution:
// C3855d.cpp
// compile with: /clr /c
generic <class T>
ref struct GC1 {
generic <class U>
ref struct GC2;
};
generic <class T>
generic <class U>
ref struct GC1<T>::GC2 { };