This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: egcs-1.1a: namespace problem
Ryszard Kabatek <rysio@rumcajs.chemie.uni-halle.de> writes:
> The sample below does not compile, because both 'A::X' and 'A::Y'
> are undeclared in the namespace B. That's wrong!
Nope, that's right, you've got the rule backwards. Koenig lookup is
used to look up function names, when the types of some of the
arguments are defined in other namespaces, not to look up types within
such a function.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil