From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 742CE3857036; Mon, 6 Sep 2021 19:56:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 742CE3857036 From: "eyalroz1 at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96645] [9/10/11/12 Regression] std::variant default constructor Date: Mon, 06 Sep 2021 19:56:01 +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: 9.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: eyalroz1 at gmx dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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, 06 Sep 2021 19:56:01 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96645 Eyal Rozenberg changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eyalroz1 at gmx dot com --- Comment #12 from Eyal Rozenberg --- (In reply to Jason Merrill from comment #8) > We cannot correctly resolve is_nothrow_constructible until we've parsed > the DMI. Given that, we have three options: >=20 > 1) Conservatively say no. > 2) Optimistically guess yes. > 3) Non-SFINAE error. > > ("We" in this sentence is the C++ standard.) But in this page, "we" is the compiler. IIUC, the standard does not allow f= or determing is_nothrow_constructible. Am I correct? If that really is the case, shouldn't the compiler emit an error saying that? Alternatively, when not following the standard strictly, why should it not = be option (4.): Ignore the official restriction on determining (nothrow) constructibility, make a best-effort attempt to determine it anyway ( which= in this example should succeed), and report failure otherwise. ? > PR81359 changed our behavior from 3 to 1. I searched that bug page for the rationale, and couldn't quite get it.=