https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108884
--- Comment #7 from Younan Zhang <zyn7109 at gmail dot com> --- (In reply to Patrick Palka from comment #4) > (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&...);` > > ``` > > And IIUC if we desugar the type-constraint C... we get > > ```cpp > template <class... Us> requires (C<Us> && ...) > friend auto factory(const Us&...); > ``` > > so the friend doesn't have a constraint that depends on an outer template > parameter (Ts) Oh I see. I thought C was the template parameter, which should be a concept.