http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54104
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-07-27 CC| |jason at gcc dot gnu.org Ever Confirmed|0 |1 Severity|critical |normal --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-07-27 09:31:17 UTC --- I think the code is valid. U doesn't need a default template argument, as per DR 226 [temp.param]/11 only applies to class templates and alias templates, not function templates. G++ accepts the code if the lamdba isn't present or if U has a default template-argument. It seems that seen_def_arg_p needs to be reset before parsing the lambda expression.