This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: ADL Help
- From: John Love-Jensen <eljay at adobe dot com>
- To: Perry Smith <pedz at easesoftware dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Mon, 06 Nov 2006 09:23:12 -0600
- Subject: Re: ADL Help
Hi Perry,
> It seems like the "here 1" version would be found but it is not. Can
> you help me to understand what I'm missing?
If you change main to...
int main() {
parm.f(parm);
return 0;
}
...or (recommended)...
int main() {
NS::T::f(parm);
return 0;
}
...then "here 1" will be used.
I was surprised to see that ungarnished f(parm) used NS::f without having to
specify NS:: or using namespace NS or using NS::f ... that smells like a bug
in the compiler.
But I'm not using the most current GCC release right now, so if it is a
bug*, maybe it's been fixed in the current GCC.
HTH,
--Eljay
* perhaps it's not a bug, and I'm mistaken (and surprised)