This is the mail archive of the gcc@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]

g++ Koenig-lookup bug


I think Koenig lookup should find both B::f and ::f, and  
call ::f, here:
  
  struct A {};
  void f(A&);
  struct B {
    void f(B&) { A a; f(a); }
  };

But Egcs-1.1 says:

clhide.cc: In method `void B::f(struct B &)': 
clhide.cc:4: no matching function for call to `B::f (A &)'
clhide.cc:4: candidates are: B::f(B &)

Nathan Myers
ncm@cantrip.org



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