fork download
  1. struct foo
  2. {
  3. template<class T>
  4. void operator()(T a){}
  5. };
  6. int main()
  7. {
  8. foo(5);
  9. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:8:10: error: no matching function for call to ‘foo::foo(int)’
prog.cpp:8:10: note: candidates are:
prog.cpp:1:8: note: foo::foo()
prog.cpp:1:8: note:   candidate expects 0 arguments, 1 provided
prog.cpp:1:8: note: foo::foo(const foo&)
prog.cpp:1:8: note:   no known conversion for argument 1 from ‘int’ to ‘const foo&’
stdout
Standard output is empty