]> gcc.gnu.org Git - gcc.git/commit
c++: *this capture in const member fn [PR95193].
authorJason Merrill <jason@redhat.com>
Mon, 1 Jun 2020 21:58:57 +0000 (17:58 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 2 Jun 2020 19:00:00 +0000 (15:00 -0400)
commit4b68cb38ddca37a14a6f2f43de3a6d396ee1bc79
treef366c93602724605812cf3de0e5dcc828b92ef7a
parent4013baf99c38f7bca06a51f8301e8fb195ccfa33
c++: *this capture in const member fn [PR95193].

Here, the capture proxy for *this is const, but its DECL_VALUE_EXPR is not.
Don't ICE on this; it's a reasonable difference, since in C++ an rvalue of
scalar type does not have cv-qualifiers.

gcc/cp/ChangeLog:

PR c++/95193
* pt.c (tsubst_decl): Relax assert.

gcc/testsuite/ChangeLog:

PR c++/95193
* g++.dg/cpp1z/lambda-this7.C: New test.
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp1z/lambda-this7.C [new file with mode: 0644]
This page took 0.058471 seconds and 6 git commands to generate.