This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/46381] New: G++ doesn't catch duplicate members produced by template instantation
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 8 Nov 2010 21:32:10 +0000
- Subject: [Bug c++/46381] New: G++ doesn't catch duplicate members produced by template instantation
- Auto-submitted: auto-generated
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.