3 // { dg-do compile { target c++20 } }
6 struct A2 { int i; A2(int); };
7 struct A3 { int i; explicit A3(int); };
10 auto x = static_cast<X>(42); // { dg-error "could not convert" }
13 auto x2 = static_cast<X2>(42);
16 // Aggregate-initialization copy-initializes, so the explicit ctor
18 auto x3 = static_cast<X3>(42); // { dg-error "could not convert" }
20 struct NonAggr { int i; virtual void foo (); };
21 auto x4 = static_cast<NonAggr>(42); // { dg-error "no matching" }