From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D60053858D38; Mon, 3 Oct 2022 06:40:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D60053858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664779254; bh=mrBoqJVe3zocQ3ZGbEFuKwo2bCvtyFZTJp/bJ/wdyVo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=M69sOsn7OksHm2wc/kg/yuVHuGD4t+cPVQDmu6Ka1S397I7ilSHVPTO4rE+4uNy6Z 88T1bS67yZhZ90h5Wp0W6XN7divKIe9MQQ3WWqNhLt/E/HGmWYRqbkY3RQUgRHfBR9 Jvn2bd65nKgOEqWfosKnqjgFA1kS7IKN7IhYeJHw= From: "jlame646 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107126] GCC accepts invalid out of class definition for destructor with C++17 Date: Mon, 03 Oct 2022 06:40:54 +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: 12.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jlame646 at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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=3D107126 --- Comment #6 from Jason Liam --- This means that the code `template struct A {~A(); };` is ill-formed only with c++20 and onwards while the code `template st= ruct A {~A(); }; template A::~A(){} ;` is ill-formed in all c++ versions including c++17.=