This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/60755] lambda capturing `this` doesn't honor const qualifier of the enclosing member function


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60755

--- Comment #3 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]