Export (0) Print
Expand All
Expand Minimize

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:
© 2015 Microsoft