This should not compile, but does: namespace N { template<typename T, typename U> struct X { }; }
template<typename T> struct Y { template<typename U> friend struct N::X; }; Y<int> y; -- Summary: G++ accepts a template friend with the wrong template parameters Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jason at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43694