class foo { template <typename T> friend T func(); }; template <typename T=int> T func() { return T(); } int main() {return 0;}
Standard input is empty
prog.cpp:8:3: error: redeclaration of friend ‘template<class T> T func()’ may not have default template arguments prog.cpp:4:14: error: ‘template<class T> T func()’ previously declared here
Standard output is empty