Daily bump.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / paren-init34.C
blob24942764cb706a0e209b0708ff63c201eaf1a760
1 // PR c++/92812
2 // { dg-do compile { target c++20 } }
3 // Initializing arrays in a member init list using ()-init, invalid cases.
5 struct S { int x, y; };
6 struct N { int x, y; N(int, int); };
8 struct A {
9   N a[2];
10   A() : a(1, 2) { } // { dg-error "could not convert" }
13 struct B {
14   S a[2];
15   B() : a(1) // { dg-error "could not convert" }
16     { }
19 // Copy-initialization does not consider explicit ctors.
20 struct E { explicit E(int); };
22 struct C {
23   E a[2];
24   C() : a(4, 5) { } // { dg-error "could not convert" }