Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
'template' : cannot specialize template in current scope
Remarks
A template cannot be specialized at class scope, only in global or namespace scope.
Example
The following example generates C3412.
// C3412.cpp
template <class T>
struct S {
template <>
struct S<int> {}; // C3412 in a class
};
The following example shows a possible resolution.
// C3412b.cpp
// compile with: /c
template <class T>
struct S {};
template <>
struct S<int> {};