Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
'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> {};