https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109677
Bug ID: 109677 Summary: Access control bypass for function template default argument brace initialization of private default constructor Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- gcc accepts-invalid: struct B { private: B(); }; template<class T> int f(T = {}); int i = f<B>(); This is mostly a curiosity, but it came up while trying to understand why a misuse of the passkey pattern was seemingly working.