הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
'arg' : template type argument cannot use a generic type parameter
Remarks
Templates are instantiated at compile time, but generics are instantiated at run time. Therefore, it is not possible to generate generic code that can call the template because the template cannot be instantiated at run time when the generic type is finally known.
Example
The following example generates C3231:
// C3231.cpp
// compile with: /clr /LD
template <class T> class A;
generic <class T>
ref class C {
void f() {
A<T> a; // C3231
}
};