template <class T> void f() { int i; // This lambda should not have a conversion op, since it captures i int (*p)() = [=]{ return i; }; // { dg-error "cannot convert" } }
*** Bug 54995 has been marked as a duplicate of this bug. ***
Author: jason Date: Sun Mar 17 02:35:18 2013 New Revision: 196729 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196729 Log: PR c++/56447 PR c++/55532 * pt.c (instantiate_class_template_1): Instantiate lambda capture list here. (tsubst_copy_and_build): Not here. Added: trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv8.C trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable2.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c
Fixed for 4.8.1.