g++ Koenig-lookup bug

ncm@cantrip.org ncm@cantrip.org
Sat Oct 17 03:08:00 GMT 1998


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




More information about the Gcc mailing list