gcc/testsuite/g++.dg/cpp1z/decomp53.C
raw| 1 | // PR c++/95328 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-options "" } |
| 4 | |
| 5 | template <typename T> |
| 6 | struct S |
| 7 | { |
| 8 | int a, b; |
| 9 | }; |
| 10 | |
| 11 | template <typename T> |
| 12 | void |
| 13 | foo () |
| 14 | { |
| 15 | auto [a, b] = S<int>(); // { dg-warning "structured bindings only available with" "" { target c++14_down } } |
| 16 | } |
| 17 | |
| 18 | int |
| 19 | main () |
| 20 | { |
| 21 | foo<int> (); |
| 22 | } |