struct A{}; struct B{ template<class T = A> void foo(){} }; int main() { B b; b.foo(); }
Standard input is empty
prog.cpp:5: error: default template arguments may not be used in function templates prog.cpp: In function ‘int main()’: prog.cpp:11: error: no matching function for call to ‘B::foo()’
Standard output is empty