From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6CA903945057; Wed, 11 Mar 2020 18:39:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CA903945057 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1583951983; bh=0hpLAZ4tgS+XkIjfPFsmAsZaIDdemNuVM4/pwEb0F5o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=w4Hj7B++RHOL5MjPZOfeLhGAlvuaoRymf6dvkdQPlEkZCZP/LnAaN9yEMuu0is9Ez CP9TgfLR1v/HPUxZ+gJvVx6zOyM1nkqkpUh30HEKeTKi244rK3Ww5ryEKY61nnYb8H 5nkSp+2CzEt9mdFiG8mwsIoLGx7Oez1UhqMrq3Z4= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/94003] is_constructible seems to have sideeffects Date: Wed, 11 Mar 2020 18:39:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 9.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: dependson 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: Wed, 11 Mar 2020 18:39:43 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94003 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |41437 --- Comment #2 from Jonathan Wakely --- Almost certainly due to one of the bugs linked to PR 59002, probably PR 414= 37. Inside the function template access checking doesn't work properly, so you = can use the private constructor, and the first instantiation of the trait gives= the wrong answer: template static bool why() { Class c; return std::is_constructible::value; } Then when the trait is rechecked later it has already been instantiated, an= d so continues to give the wrong answer. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D41437 [Bug 41437] No access control for classes in template functions=