https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91418
Bug ID: 91418 Summary: Nested class of templated class cannot declare parent class friend Product: gcc Version: 9.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: Darrell.Wright at gmail dot com Target Milestone: --- As seen here https://gcc.godbolt.org/z/FvHncw. One cannot express friend class Parent; when parent is templated from a nested class within a member function As a workaround, it will work with friend class Parent<Arg>;