https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66999

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Wed Jun 12 22:41:35 2019
New Revision: 272223

URL: https://gcc.gnu.org/viewcvs?rev=272223&root=gcc&view=rev
Log:
        PR c++/66999 - 'this' captured by reference.
        * parser.c (cp_parser_lambda_introducer): Reject `&this'.  Use
        cp_lexer_nth_token_is instead of cp_lexer_peek_nth_token.

        * g++.dg/cpp0x/lambda/lambda-this21.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this21.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to