| 1 |
// Don't try to deduce array bounds from a dependent initializer. |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
struct A { int i,j; }; |
| 5 |
|
| 6 |
template <class T> void f(T t) |
| 7 |
{ |
| 8 |
A ar[] = { t, t }; |
| 9 |
static_assert (sizeof(ar)/sizeof(A) == 1, ""); |
| 10 |
} |
| 11 |
|
| 12 |
int main() |
| 13 |
{ |
| 14 |
f(42); |
| 15 |
} |