http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60463
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Fri May 9 20:07:45 2014 New Revision: 210292 URL: http://gcc.gnu.org/viewcvs?rev=210292&root=gcc&view=rev Log: PR c++/60463 PR c++/60755 * lambda.c (lambda_expr_this_capture): Add new parameter add_capture_p controlling whether the functions will try to capture 'this' via the default capture. (maybe_resolve_dummy): Likewise. * cp-tree.h: Adjust prototypes. * call.c, semantics.c: Change callers of these functions. * call.c (build_new_method_call_1): Use the actual 'this' that would be potentially captured for the overload resolution, instead of the dummy object. Added: trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const-this.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/call.c trunk/gcc/cp/cp-tree.h trunk/gcc/cp/lambda.c trunk/gcc/cp/semantics.c