From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1B30A3858C54; Fri, 2 Sep 2022 06:03:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B30A3858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662098598; bh=R0llXlYWAKfBCd45paS0tqTos1vzXv/ZiUakrAHuJeY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZZCJ1KQTeomPfCEBiqX584SHtnWu39fPmidEC8AfQMMkyMOCIeTTQOke+gqZ+JMCg d+mH9uJl16unJdLFZDFtbgX+1DvwcWKfyR8cdmAMe0I9ezQa66bWcAVkPztUk6gYtb JIfLMgYWJFmI63zydrmg38huGYK7+/IplyUbje9M= From: "antoshkka at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/71579] type_traits miss checks for type completeness in some traits Date: Fri, 02 Sep 2022 06:03:17 +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: 6.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: antoshkka at gmail dot com 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: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D71579 --- Comment #22 from Antony Polukhin --- > Maybe we should consider dropping all the static assertions from traits t= hat are implemented using a compiler built-in. Sounds like the right thing to do. > Our type trait and the __has_virtual_destructor built-in both seem to get= this wrong, rejecting Incomplete[2], which is not a class type, and so doe= sn't need to be complete (or maybe the precondition is wrong and there's a = library defect?) The library precondition seems right. As I read it, the trait just checks f= or `virtual` on the destructor. If there's no destructor - it is fine, no `virtual` on it.=