[Bug c++/108884] [temp.friends]/9: Should constraint friends declared in class scope differ with definition out of scope?
zyn7109 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Feb 22 14:12:22 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108884
--- Comment #3 from Younan Zhang <zyn7109 at gmail dot com> ---
(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?
>
> 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 <C... Us>
> friend auto factory(const C Us&...);`
> ```
typo: friend auto factory(const Us&...);
More information about the Gcc-bugs
mailing list