1 // P0892R2
2 // { dg-do compile }
3 // { dg-options "-std=c++2a" }
4 
foo()5 int foo() { return 42; }
6 int g;
7 
8 struct S {
9   explicit(foo()) S(int); // { dg-error "call to" }
10   explicit(int) S(int, int); // { dg-error "expected" }
11   explicit(false ? 1 : throw 1) S(int, int, int); // { dg-error "not a constant" }
12 };
13 
14 struct S2 {
15   explicit(true) S2();
16   explicit(false) S2(); // { dg-error "cannot be overloaded" }
17 };
18 
19 int
main()20 main ()
21 {
22   S s1 = { 1 };
23   S s2 = { 1, 2 }; // { dg-error "could not convert" }
24   S s3 = { 1, 2, 3 };
25 }
26