http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53137
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> 2012-06-20 07:22:00 UTC --- Author: jason Date: Wed Jun 20 07:21:55 2012 New Revision: 188810 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188810 Log: Reapply: PR c++/53137 * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE. (instantiate_decl): Don't push_to_top_level for local class methods. (instantiate_class_template_1): Or for local classes. Added: branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template5.C Modified: branches/gcc-4_7-branch/gcc/cp/ChangeLog branches/gcc-4_7-branch/gcc/cp/pt.c branches/gcc-4_7-branch/gcc/testsuite/ChangeLog