https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97358
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Slightly modified testcase where bar is surely instantiated and clang++ still accepts it. It actually ICEs in all of -std=c++{11,14,17,20}. struct A; struct B { A foo (); }; enum C { E }; struct A { template <typename... T> void bar (T... x) { int v {[x...] { x; }...}; } }; template <typename, C> using F = B; struct G { F<int, E> baz (); }; enum H { J }; struct D { using K = G; }; template <H> struct I : D { void qux (); }; template <H h> void I<h>::qux () { K a; a.baz ().foo ().bar (); } void test () { I<J> i; i.qux (); }