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

Re: Bug (?) in namespaces and overloading resolution


> 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


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