http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54104
Bug #: 54104 Summary: no default argument for 'XXX' Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: critical Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: likan_999.stud...@sina.com The following piece of code doesn't compile under gcc 4.7.1 with flag -std=gnu++11: template <typename T> struct X {}; template <template <typename T> class P = X, typename U> void f(const U& m) { auto g = [] () {}; } Clang accepts it correctly. If I remove the line `auto g=...', it compiles successfully. I am not an expert to standard. So can anyone take a look, and confirm whether it is a bug of clang or a bug of gcc? Thanks.