// PR c++/85214 // { dg-do compile { target c++17 } } struct g { constexpr operator int() { return true; } }; template constexpr bool m = true; template struct C { typedef double q; }; void ao() { [](auto i) { using ar = typename C::q; [](auto j) { using as = typename C::q; if constexpr (m) {} // { dg-bogus "'i' is not captured" "PR107437" { xfail { *-*-* } } .-1 } }(g()); }(g()); }