नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'param' : template parameter not used or deducible in partial specialization 'specialization'
Remarks
A template parameter is not used in a partial specialization. This makes the partial specialization unusable because the template parameter cannot be deduced.
Example
The following example generates C2764:
// C2764.cpp
#include <stdio.h>
template <class T1, class T2>
struct S {
int m_i;
};
template <class T1, class T2>
struct S<int, T2*> { // C2764
// try the following line instead
// struct S<T1(*)(T2), T2*> {
char m_c;
};
int main() {
S<int, char> s1;
S<void (*)(short), short *> s2;
s2.m_c = 10;
s1.m_i = s2.m_c;
printf_s("%d\n", s1.m_i);
}