Compiler Error C2768
'function': illegal use of explicit template arguments
Remarks
The compiler was unable to determine if a function definition was an explicit specialization of a function template or if it was a new function.
This error was introduced in Visual Studio .NET 2003, as part of the compiler conformance enhancements.
Example
The following sample generates C2768:
// C2768.cpp
template<typename T>
void f(T) {}
void f<int>(int) {} // C2768
// an explicit specialization
template<>
void f<int>(int) {}
// global non-template function overload
void f(int) {}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for