| 1 |
// Origin PR c++/51462 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
struct A |
| 5 |
{ |
| 6 |
int i = 0; |
| 7 |
}; |
| 8 |
|
| 9 |
struct B |
| 10 |
{ |
| 11 |
A a; |
| 12 |
// P0960R3 allows paren-init. |
| 13 |
constexpr B() : a(0) {} // { dg-error "no matching function" "" { target c++17_down } } |
| 14 |
}; |