gcc/testsuite/g++.dg/gomp/pr84469.C
raw| 1 | // PR c++/84469 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-options "" } |
| 4 | |
| 5 | struct A { |
| 6 | template <typename T> |
| 7 | void bar () const {} |
| 8 | }; |
| 9 | |
| 10 | template <typename> |
| 11 | void |
| 12 | foo () |
| 13 | { |
| 14 | A a[1][1]; |
| 15 | #pragma omp for |
| 16 | for (auto const& [b]: a) // { dg-warning "structured bindings only available with" "" { target c++14_down } } |
| 17 | b.bar<int> (); |
| 18 | } |
| 19 | |
| 20 | int |
| 21 | main () |
| 22 | { |
| 23 | foo<int> (); |
| 24 | } |