------- Comment #2 from pinskia at gcc dot gnu dot org 2006-03-03 00:51 ------- No this should not compile and here is why: class Rational { public: Rational& negate() { return *this; } };
namespace pm { Rational& inv_sign(Rational& x) { return x.negate(); } } Rational is in the toplevel namespace so that is the only place where argument dependent lookup will look to find the function inv_sign. Argument dependent lookup will not relook into the namespace pm. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26536