Compiler Error C2780
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C2780.
declaration' : expects N arguments - M provided
A function template has too few or too many arguments.
The following sample generates C2780 and shows how to fix it:
// C2780.cpp
template<typename T>
void f(T, T){}
int main() {
f(1); // C2780
// try the following line instead
// f(1,2);
}
Show: