共用方式為


編譯器錯誤 C2765

'function' :函式範本的明確特製化不能有任何預設自變數

函式範本的明確特製化不允許預設自變數。 如需詳細資訊,請參閱 函式範本的明確特製化。

下列範例會產生 C2765:

// C2765.cpp
template<class T> void f(T t) {};

template<> void f<char>(char c = 'a') {}   // C2765
// try the following line instead
// template<> void f<char>(char c) {}