| 1 |
// { dg-do compile { target c++11 } } |
| 2 |
template<typename... Args> |
| 3 |
struct tuple { |
| 4 |
static const int value = 0; |
| 5 |
}; |
| 6 |
|
| 7 |
template<> |
| 8 |
struct tuple<> { |
| 9 |
static const int value = 1; |
| 10 |
}; |
| 11 |
|
| 12 |
template<> |
| 13 |
struct tuple<int> { |
| 14 |
static const int value = 2; |
| 15 |
}; |
| 16 |
|
| 17 |
|
| 18 |
template<> |
| 19 |
struct tuple<int, float> { |
| 20 |
static const int value = 3; |
| 21 |
}; |
| 22 |
|
| 23 |
template<typename T> |
| 24 |
struct tuple<T, T> { |
| 25 |
static const int value = 4; |
| 26 |
}; |
| 27 |
|
| 28 |
template<> |
| 29 |
struct tuple<float, float> { |
| 30 |
static const int value = 5; |
| 31 |
}; |
| 32 |
|
| 33 |
int a0[tuple<float>::value == 0? 1 : -1]; |
| 34 |
int a1[tuple<>::value == 1? 1 : -1]; |
| 35 |
int a2[tuple<int>::value == 2? 1 : -1]; |
| 36 |
int a3[tuple<int, float>::value == 3? 1 : -1]; |
| 37 |
int a4[tuple<int, int>::value == 4? 1 : -1]; |
| 38 |
int a5[tuple<float, float>::value == 5? 1 : -1]; |