// PR c++/84496 // { dg-do compile { target c++14 } } template struct C { static constexpr T D = n; }; struct E : C {}; template struct F : C {}; template T foo (); template struct H { typedef int G; }; template class I; struct L; template struct J; template struct K; struct R { template static J () (foo...)), L> o; }; template struct K : R { typedef decltype (o) G; }; template struct D : K::G>::D, P, Q...> {}; template struct I

: D {}; template class function; template struct function { template ::G> struct C; template using U = int; template , typename = U, void>> function (P); }; template template function::function (P) { } void bar (function); void baz () { auto a = [] { static int counter; bar ([] (auto) { counter++; }); }; }