aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/decomp60.C
blob: b6117f3af58335b85018775d98f0eff069780ed1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/85889
// { dg-do compile { target c++17 } }
// { dg-options "" }

struct X { int i, j; };
void f() {
  X x{};
  auto [i, j] = x;
  [&i]() { }; // { dg-warning "captured structured bindings" "" { target c++17_only } }
  [i]() { }; // { dg-warning "captured structured bindings" "" { target c++17_only } }
}