1 // PR c++/89576 2 // { dg-do compile { target c++17 } } 3 4 template <class T> foo()5 void foo() 6 { 7 constexpr int x = 0; 8 [&] { 9 if constexpr (x) {} 10 }; 11 } 12