[Bug c++/26536] wrong name lookup in a class template in presence of namespaces
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Mar 3 00:51:00 GMT 2006
------- 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
More information about the Gcc-bugs
mailing list