This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13590] New: unexpected overload resolution
- From: "boris at kolpackov dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jan 2004 20:54:27 -0000
- Subject: [Bug c++/13590] New: unexpected overload resolution
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ cat >test.cpp
struct Edge
{
};
struct Node
{
void f (Edge&);
};
struct AE : virtual Edge
{
};
struct AN : virtual Node
{
void f (AE&);
using Node::f;
};
struct BN : virtual Node
{
using Node::f;
};
struct CN : virtual AN, virtual BN
{
};
void f ()
{
AE e;
CN n;
n.f (e);
}
$ g++ --version
g++ (GCC) 3.3.3 20031229 (prerelease) (Debian)
$ g++ -c ./test.cpp
test.cpp: In function `void f()':
test.cpp:34: error: request for member `f' is ambiguous
test.cpp:7: error: candidates are: void Node::f(Edge&)
test.cpp:7: error: void Node::f(Edge&)
test.cpp:17: error: void AN::f(AE&)
$
--
Summary: unexpected overload resolution
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: boris at kolpackov dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-gnu-lnux
GCC host triplet: i386-gnu-lnux
GCC target triplet: i386-gnu-lnux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13590