// PR c++/47049 // { dg-do compile { target c++11 } } enum { E = 0, F = 1 }; template class S {}; template struct T { static void foo (S *p) { S u; [&u] ()->bool {} (); } }; int main() { T<0>().foo(0); }