This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16963] New: Ambiguity? Seems implausible
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Aug 2004 14:09:13 -0000
- Subject: [Bug c++/16963] New: Ambiguity? Seems implausible
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
struct C{};
struct D{};
template<typename T>
struct Foo {
void Bar(T t) {}
};
struct R : public Foo<C>, public Foo<D> {};
int main() {
C c;
D d;
R r;
r.Bar(c);
r.Bar(d);
return 0;
}
gets you:
~/ootbc/members/src$ c++ foo.cc
foo.cc: In function `int main()':
foo.cc:14: error: request for member `Bar' is ambiguous
foo.cc:5: error: candidates are: void Foo<T>::Bar(T) [with T = D]
foo.cc:5: error: void Foo<T>::Bar(T) [with T = C]
foo.cc:15: error: request for member `Bar' is ambiguous
foo.cc:5: error: candidates are: void Foo<T>::Bar(T) [with T = D]
foo.cc:5: error: void Foo<T>::Bar(T) [with T = C]
--
Summary: Ambiguity? Seems implausible
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16963