From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AFA6D3851C09; Mon, 25 May 2020 22:06:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AFA6D3851C09 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1590444369; bh=iVFGdjkOdLKF42FnjQ/WXmHmjO5408jx33ml+QutiqM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=n5pzGjDrhyvczDDh6wZ8KbiI/xmEchkBBapURm8J31deU+CpPJ2rmEf9r1U0ZuWR7 KSU8ZsN768arLnQFt4jCMRdLg1zHmL/w+XUUWuJjn9Odu4zgbv/rYwngP4XafduB0H j2fDKBfpkaMmFpheZ+sDQNrhJNDU3AHRNHraXXxU= 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: Mon, 25 May 2020 22:06:09 +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: Mon, 25 May 2020 22:06:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D90212 --- Comment #3 from CVS Commits --- The releases/gcc-10 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:aa613a81831bdc044840a95a7a7803a235608503 commit r10-8183-gaa613a81831bdc044840a95a7a7803a235608503 Author: Jason Merrill Date: Mon May 25 18:04:39 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.=