https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104225
Bug ID: 104225 Summary: accepts-invalid new expression that uses deleted implicit default constructor of class specialization Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ppalka at gcc dot gnu.org Target Milestone: --- The following testcase compiles without error, but should be rejected because it uses B's deleted default constructor: class A { ~A(); }; template <class> class B { A f = 1; }; int main() { new B<int>; }