From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D6D373858C2C; Sat, 27 May 2023 17:33:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6D373858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685208790; bh=phqizefFo1y4NsLspaqY3LivIbK5aQWWVyrnOhPj6ns=; h=From:To:Subject:Date:From; b=IElFGgOohvCwlZ8L2vUPpJ46AtMNvmk6i3WbRw08BV6/FxgJQiGsIHlMsYhkEDnln ASmojduJ8mhK7mEyQ8Rqq8QMyPALzrthWhbmc8xXoHYDPOckWvQestN4ts7lcJXjTa rAS2Oo0FjJFLQ0mGUNYqa8j0zP+lSbD+HgtQcGMA= From: "services+gccbugs at vasama dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110006] New: friend function template with NTTP and constraint doesn't match existing declaration Date: Sat, 27 May 2023 17:33:10 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: services+gccbugs at vasama dot org 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=3D110006 Bug ID: 110006 Summary: friend function template with NTTP and constraint doesn't match existing declaration Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: services+gccbugs at vasama dot org Target Milestone: --- // https://godbolt.org/z/jWo6ve9fh template class s; template void constraint(s const&, int&); template U function(s const x) requires requires (U& u) { constraint(x, u); } { return {}; } template class s { template friend U function(s const x) requires requires (U& u) { constraint(x, u); }; }; int f(s q) { // error: call of overloaded 'function(s&)' is ambiguous return function(q); }=