// Test that non-aggregates don't get the aggregate deduction. // { dg-do compile { target c++20 } } // { dg-prune-output "no matching function" } struct A { A(); }; template struct S1 { T x; }; S1 s1 = {1}; // OK template struct S2 { S2 (); T x; }; S2 s2 = {1}; // { dg-error "deduction failed" } template struct S3 { private: T x; }; S3 s3 = {1}; // { dg-error "deduction failed" } template struct S4 { virtual void f(); T x; }; S4 s4 = {1}; // { dg-error "deduction failed" } template struct S5: public A { using A::A; T x; }; S5 s5 = {1}; // { dg-error "deduction failed" } template struct S6: virtual A { T x; }; S6 s6 = {1}; // { dg-error "deduction failed" }