Kompilatorfel C2765

"funktion" : en explicit specialisering av en funktionsmall får inte ha några standardargument

Anmärkningar

Standardargument tillåts inte för en explicit specialisering av en funktionsmall. För mer information, se Explicit specialisering av funktionsmallar.

Exempel

I följande exempel genereras 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) {}