Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
'function' : an explicit specialization of a function template cannot have any default arguments
Remarks
Default arguments are not allowed on an explicit specialization of a function template. For more information, see Explicit Specialization of Function Templates.
Example
The following example generates 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) {}