https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120655
--- Comment #2 from jack <jack.cui2 at foxmail dot com> --- (In reply to Patrick Palka from comment #1) > Implicitly generated deduction guides that refer to class members are kind > of a weird corner case. > > What would the deduction guide look like if it were explicitly written? > Something like > > template<class T, class U> B(U, typename B<T>::template TA<U>) -> B<T>; > > As written, T is not deducible here. Implementations do various > shortcuts/tricks when generating an implicit guide to make this work, but > the standard doesn't say what exactly to do here AFAIK. 1 - Yes, I agree this is a weird corner case. 2 - I have checked c++ N4917 draft, and indeed did not find anything about what exactly we need to do in this case. I guess the example cppreference presented is misleading. And other compilers do hacks to make it work? So can we say this is not a bug and close it?