https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84884
Bug ID: 84884 Summary: [DR 2244] [C++17] protected constructor and aggregate initialization of base Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jason at gcc dot gnu.org Target Milestone: --- Here we should accept f and g because we're using the protected constructor on a base of a B object, so friendship makes it OK: struct A { protected: A(); }; struct B : A { friend B f(); friend B g(); friend B h(); }; B f() { return {}; } // ok B g() { return {{}}; } // ok B h() { return {A{}}; } // error This will need significant changes to build_aggr_conv.