共用方式為


編譯器錯誤 C2766

明確特製化;'specialization' 已定義

不允許重複的明確特製化。 如需詳細資訊,請參閱 函式範本的明確特製化。

下列範例會產生 C2766:

// C2766.cpp
// compile with: /c
template<class T>
struct A {};

template<>
struct A<int> {};

template<>
struct A<int> {};   // C2766
// try the following line instead
// struct A<char> {};