/cp
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / lambda-generic-69078-2.C
blob318e0967250cfd867e0a02ec211bcdc0ac9b8a72
1 // PR c++/69078
2 // { dg-do run { target c++14 } }
4 #include <cassert>
6 template<typename F>
7 void run( F &&f ) {
8   f(nullptr);
11 struct V {
12   int i;
15 int main() {
16   static V const s={2};
17   assert (s.i == 2);
18   run([](auto){
19       assert (s.i == 2);
20     });