From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2C2413858D33; Wed, 22 Feb 2023 14:12:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C2413858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677075143; bh=CY7nL1/tn/YVj2a1oQ5XAyc+gubf9K5w3raF93U8SYk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TCQqCRhlG3j8TH0wXpsIWoKcMIljt/zJfU0qHjKLkLLpSI5HH+Sm2aXcT8eN+X1bU HSCf9MOA0tJq/sTMyXbfwPBlYFFchKlLjEKWTbLMDdyhbumOTN7T1LZcZquWjxZiXd Vb3Ze3Zo29IqqpcVcze4jCvbgtCOfMJzI9jClfnw= From: "zyn7109 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108884] [temp.friends]/9: Should constraint friends declared in class scope differ with definition out of scope? Date: Wed, 22 Feb 2023 14:12:22 +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.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: zyn7109 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=3D108884 --- Comment #3 from Younan Zhang --- (In reply to Younan Zhang from comment #2) > (In reply to Patrick Palka from comment #1) > > #1 is neither a non-template friend declaration with a requires-clause = nor a > > friend function template with a constraint that depends on a template > > parameter from an enclosing template, so it seems to me [temp.friend]/9 > > doesn't apply here? >=20 > I'm a bit confused. Doesn't `friend auto factory(const C auto&...)` equal= to > template where `Us` depends on parameter from outter C? > ```cpp > template > friend auto factory(const C Us&...);` > ``` typo: friend auto factory(const Us&...);=