From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 63EB63858D37; Thu, 30 Nov 2023 09:27:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63EB63858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701336443; bh=zwXUe4xjFjo/LGABPns/esvLr93JHGWjj34QuBuczSk=; h=From:To:Subject:Date:From; b=lAWGwlvQiF2F8iB5En0rV39GDkW9FYGIm6nCNIDkKUv/WWZc2Xww+y3GIUVwWPovA /LNB4sOvI75wy8vHvOIn+VB/iPcEolIoIeBze2aSV2FxqqELD5JKsKnW1exj1hAgrn bOTXv+APXvJiVKxHgB7BT57bLFdWs0AC5XE0F0wI= From: "fchelnokov at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112775] New: Class template partial specialization with decltype(n) is wrongly rejected Date: Thu, 30 Nov 2023 09:27:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fchelnokov 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D112775 Bug ID: 112775 Summary: Class template partial specialization with decltype(n) is wrongly rejected Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- In this program template class A; template class A {}; class template A has one type parameter T, and two arbitrary non-type parameters (of type T). And also a specialization of A is provided, having equal non-type template parameters. The program is accepted by Clang and MSVC, but not by GCC: error: partial specialization 'class A' is not more specialized than 5 | class A {}; | ^~~~~~~~~~~~~~~~~~~~ note: primary template 'template, T > cl= ass A' Online demo: https://godbolt.org/z/qjYMn8bd6=