https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111602
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2023-09-26 Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Slightly reduced: ``` template<class> constexpr bool V = true; struct F { template<class T, bool = V<T>> F(T) {} }; template<class T> struct C { C(F = []{}) {} }; template<class T> decltype(T()) g() { return T(); } int main() { g<C<int>>(); } ``` The local type of f() is not needed.