This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bug (?) in namespaces and overloading resolution
- To: njs3 at doc dot ic dot ac dot uk, egcs-bugs at cygnus dot com
- Subject: Re: Bug (?) in namespaces and overloading resolution
- From: "Martin v. Loewis" <loewis at informatik dot hu-berlin dot de>
- Date: Mon, 22 Jun 1998 22:18:18 +0200
> The following code does not compile on 19980604, I believe it should.
> It works if the defintion of struct X is moved into namespace B.
Can you be a bit more specific why you think this should work? It
seems you are aiming at argument-dependent lookup. Given the arguments
cerr of type std::ostream (in theory) and t of type A::X, the
associated namespaces of this call are std and A. Neither one defines
a suitable operator; it doesn't help that one is defined in B.
So AFAICT, the diagnosis is right.
Martin