| 1 |
// { dg-do compile { target c++14 } } |
| 2 |
// PR libstdc++/101427 |
| 3 |
|
| 4 |
#include <tuple> |
| 5 |
|
| 6 |
void test_pr101427() |
| 7 |
{ |
| 8 |
std::tuple<int, int> tup1; |
| 9 |
std::get<int>(tup1); // { dg-error "here" } |
| 10 |
|
| 11 |
const std::tuple<int, long, int, long> tup2; |
| 12 |
std::get<long>(tup2); // { dg-error "here" } |
| 13 |
|
| 14 |
std::tuple<char, short, float, short, int> tup3; |
| 15 |
std::get<short>(std::move(tup3)); // { dg-error "here" } |
| 16 |
|
| 17 |
const std::tuple<double, long, double, long> tup4; |
| 18 |
std::get<double>(std::move(tup4)); // { dg-error "here" } |
| 19 |
|
| 20 |
// { dg-error "must occur exactly once in the tuple" "" { target *-*-* } 0 } |
| 21 |
} |
| 22 |
|
| 23 |
// { dg-prune-output "use of deleted function" } |