https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100918
Bug ID: 100918 Summary: Naming a destructor as a qualified template-id results in bogus access error Product: gcc Version: 11.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: struct Outer { template<class T> struct Inner { ~Inner(); }; }; template<> Outer::Inner<int>::~Inner<int>() {} is rejected with <stdin>: In destructor ‘Outer::Inner<T>::~Inner() [with T = int]’: <stdin>:7:21: error: ‘template<class T> struct Outer::Inner’ is inaccessible within this context <stdin>:3:12: note: declared here