https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66990
Bug ID: 66990 Summary: Wrong diagnostics when template being specialized is ambiguous Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rs2740 at gmail dot com Target Milestone: --- Consider: namespace A { inline namespace B { template<class> struct C; } template<class> struct C; template<> struct C<int>{}; } Lookup for `C` is ambiguous, obviously, but the diagnostics doesn't say that. Instead, we get (with gcc prog.cc:4:23: error: 'C' is not a class template template<> struct C<int>{}; ^ prog.cc:4:28: error: template specifiers not specified in declaration of 'template<class> struct A::C' template<> struct C<int>{}; ^ which is rather unhelpful.