共用方式為


編譯器錯誤 C2908

明確特製化; 'template' 已經具現化

主要範本的特製化會在明確特製化之前發生。

下列範例會產生 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