From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 490493857C62; Fri, 28 Aug 2020 11:26:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 490493857C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1598613995; bh=+MolOpdnWPbQH1NDA4Ze4i0YWR9wGb671zt9fz3lKxs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yqzjKwANkFD14TMHePriaXFwDvzzM9JIujzv54wYdP7JM859q/I1x9Jykss7JDUBo VDuBOFSZJYqMj0hBSCN4IUBjlqpbj8k/KN3fyy61gfjAaTglHvOAqI6DwkP3PVATC5 XJGqpGnjcb/YZAmqirzTfcZFr6Ok8ZKr9XcaPAnU= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96830] GCC does not complain template-head containing requires clause Date: Fri, 28 Aug 2020 11:26:35 +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: 10.2.0 X-Bugzilla-Keywords: accepts-invalid 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: 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: Fri, 28 Aug 2020 11:26:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96830 --- Comment #2 from Jonathan Wakely --- G++ still accepts this version, though EDG and Clang reject it: template concept C =3D requires { typename T::value_type; }; template class Foo { public: void func(); }; template void Foo::func() {} $ edg --c++20 -c 96830.C "96830.C", line 10: error: template argument list must match the parameter = list void Foo::func() ^ 1 error detected in the compilation of "96830.C". $ clang++ -std=3Dc++2a -c 96830.C 96830.C:9:10: error: type constraint differs in template redeclaration template ^ 96830.C:3:10: note: previous template declaration is here template ^ 1 error generated.=