From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C349A389365C; Tue, 5 May 2020 21:40:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C349A389365C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588714837; bh=qYHrWZBCVdVvVj31cPEF/ajhEUqS9Iaduo2jfhiVuz8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TRNfh3OrBPHkBpWlJQyvDQDbJD+UO76MvuhJYK/bdYdnXhB06tltp5hAJgnTUA7Dd fhZhdPnfdU6UvQVE8qCPZOOzklwV/rSD+D81rWYx3UfsrMMyK8gkYoOQtuizWF1bUT lvvtHalHKq1MWgp5eK0FTuFJ97enY7AwyH4pnudI= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/90212] [8/9/10/11 Regression] by-ref capture of constexpr class object rejected Date: Tue, 05 May 2020 21:40:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 8.3.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2020 21:40:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D90212 --- Comment #2 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:04b89192ace3a766a17374d5bef8fb19d9be2d7c commit r11-122-g04b89192ace3a766a17374d5bef8fb19d9be2d7c Author: Jason Merrill Date: Tue May 5 17:39:19 2020 -0400 c++: constexpr and lambda capture [PR90212] This is the same issue as PR86429, just in potential_constant_expressio= n_1 rather than cxx_eval_constant_expression. As in that case, when we're trying to evaluate a constant expression within a lambda, we don't have= a constant closure object to refer to, but we can try to refer directly to the captured variable. gcc/cp/ChangeLog 2020-05-05 Jason Merrill PR c++/90212 * constexpr.c (potential_constant_expression_1): In a lambda function, consider a captured variable directly.=