| 1 |
// PR c++/43143 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
template<typename T> |
| 5 |
T&& declval(); |
| 6 |
|
| 7 |
template<class T, class... Args> |
| 8 |
void test() { |
| 9 |
T t(declval<Args>()...); |
| 10 |
} |
| 11 |
|
| 12 |
int main() { |
| 13 |
test<const int>(); // OK |
| 14 |
test<int[23]>(); // Error |
| 15 |
} |