gcc/gcc/testsuite/g++.dg/cpp1z/decomp19.C

14 lines
261 B
C

// PR c++/78931
// { dg-do run { target c++11 } }
// { dg-options "" }
int
main ()
{
int x = 99;
struct S { int &x; };
S s{x};
auto [p] = s; // { dg-warning "decomposition declaration only available with" "" { target c++14_down } }
return p - 99;
}