| 1 |
// PR c++/61723 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
namespace std { |
| 5 |
template < class > struct initializer_list // { dg-message "initializer_list" } |
| 6 |
{ |
| 7 |
#if BUG1 |
| 8 |
int _M_len; |
| 9 |
#endif |
| 10 |
const int *begin (); |
| 11 |
const int *end (); |
| 12 |
}; |
| 13 |
} |
| 14 |
|
| 15 |
struct J |
| 16 |
{ |
| 17 |
J (const int &); |
| 18 |
template < typename InputIterator > J (InputIterator, InputIterator); |
| 19 |
J (std::initializer_list < int >p1):J (p1.begin (), p1.end ()) { } |
| 20 |
}; |
| 21 |
|
| 22 |
struct L |
| 23 |
{ |
| 24 |
L ():dim (0) { } |
| 25 |
J dim; |
| 26 |
}; |
| 27 |
|
| 28 |
void |
| 29 |
fn1 () |
| 30 |
{ |
| 31 |
L spec; |
| 32 |
spec.dim = { }; |
| 33 |
} |
| 34 |
|
| 35 |
// { dg-prune-output "compilation terminated" } |