1 // { dg-do compile { target c++14 } } 2 f()3 void f() 4 { 5 [&x=1]{}; // { dg-error "cannot capture|cannot bind non-const lvalue ref" } 6 } 7