#include <iostream> #include <set> using namespace std; void foo(set<foobar>); class foobar { public: int x; }; int main() { set<foobar> foobar_set; foo(foobar_set); } void foo(set<foobar> foobar_set) { }
Standard input is empty
prog.cpp:5:14: error: ‘foobar’ was not declared in this scope
void foo(set<foobar>);
^
prog.cpp:5:20: error: template argument 1 is invalid
void foo(set<foobar>);
^
prog.cpp:5:20: error: template argument 2 is invalid
prog.cpp:5:20: error: template argument 3 is invalid
prog.cpp: In function ‘int main()’:
prog.cpp:20:17: error: cannot convert ‘std::set<foobar>’ to ‘int’ for argument ‘1’ to ‘void foo(int)’
foo(foobar_set);
^
Standard output is empty