Compiler Error C2780
TOC
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

Compiler Error C2780

'declaration' : expects number1 arguments - number2 provided

A function template has too few arguments.

The following sample generates C2780:

// C2780.cpp
template<typename T>
void f(T, T){}

int main() {
   f(1);  // C2780
   // try the following line instead
   // f(1,2);
}
Show:
© 2016 Microsoft