| 1 |
// PR c++/117107 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
// { dg-options "" } |
| 4 |
|
| 5 |
template <typename, typename> |
| 6 |
constexpr bool is_same = false; // { dg-warning "variable template" "" { target c++11_down } } |
| 7 |
template <typename T> |
| 8 |
constexpr bool is_same<T, T> = true; // { dg-warning "variable template" "" { target c++11_down } } |
| 9 |
|
| 10 |
struct tuple { |
| 11 |
template <unsigned long I> |
| 12 |
void check_tuple_like() { |
| 13 |
tuple t; |
| 14 |
auto [v, r] = t; // { dg-warning "structured bindings" "" { target c++14_down } } |
| 15 |
(void)[v, r] { // { dg-warning "captured structured" "" { target c++17_down } } |
| 16 |
decltype(v) x; |
| 17 |
}; |
| 18 |
} |
| 19 |
int a = 0; |
| 20 |
int &b = a; |
| 21 |
}; |