Compiler Error C3412
'template' : cannot specialize template in current scope
A template cannot be specialized at class scope, only in global or namespace scope.
Examples
The following sample generates C3412.
// C3412.cpp
template <class T>
struct S {
template <>
struct S<int> {}; // C3412 in a class
};
The following sample shows a possible resolution.
// C3412b.cpp
// compile with: /c
template <class T>
struct S {};
template <>
struct S<int> {};
Pripomienky
https://aka.ms/ContentUserFeedback.
Pripravujeme: V priebehu roka 2024 postupne zrušíme službu Problémy v službe GitHub ako mechanizmus pripomienok týkajúcich sa obsahu a nahradíme ju novým systémom pripomienok. Ďalšie informácie nájdete na stránke:Odoslať a zobraziť pripomienky pre