[Bug c++/46381] New: G++ doesn't catch duplicate members produced by template instantation
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 8 21:32:00 GMT 2010
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: unassigned@gcc.gnu.org
ReportedBy: jason@gcc.gnu.org
CC: jason@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.
More information about the Gcc-bugs
mailing list