Compiler Error C2908
explicit specialization; 'template' has already been instantiated
A specialization of the primary template occurs before the explicit specialization.
The following sample generates C2908:
// C2908.cpp
// compile with: /c
template<class T> class X {};
void f() {
X<int> x; //specialization and instantiation
//of X<int>
}
template<> class X<int> {} // C2908, explicit specialization
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for