This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13590] New: unexpected overload resolution


$ 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]