http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46381
Summary: G++ doesn't catch duplicate members produced by template instantation Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org CC: ja...@gcc.gnu.org Core issue 996: template<typename T, typename U> struct Outer { template<typename X, typename Y> struct Inner; template<typename Y> struct Inner<T, Y> {}; template<typename Y> struct Inner<U, Y> {}; }; Outer<int, int> outer; // #1 Here the instantiation of Outer<int, int> is ill-formed, because the two partial specializations of Inner have the same arguments, but we don't currently give an error.