Debian Codegraph @

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

raw
1 // { dg-do compile { target c++17 } }
2
3 struct A { bool a, b; };
4 struct B { int a, b; };
5
6 void
7 foo ()
8 {
9 auto [ a, b ] = A ();
10 for (auto [ a, b ] = A (); a; )
11 ;
12 if (auto [ a, b ] = A (); a)
13 ;
14 switch (auto [ a, b ] = B (); b)
15 {
16 case 2:
17 break;
18 }
19 auto && [ c, d ] = A ();
20 [[maybe_unused]] auto [ e, f ] = A ();
21 alignas (A) auto [ g, h ] = A ();
22 __attribute__((unused)) auto [ i, j ] = A ();
23 }