Compiler Error C2908

explicit specialization; 'template' has already been specialized from the primary template

This error occurs when a specialization of the primary template has been generated before the compiler encounters an explicit specialization. For example:

template<class T> class X {};

void f() {
X<int> x;      //specialization and instantiation
         //of X<int>
}

template<> class X<int> {}   //explicit specialization

This code will generate the error.