[Bug c++/11828] [3.4 regression] qualified dependent name looked up too early
benko at sztaki dot hu
gcc-bugzilla@gcc.gnu.org
Thu Aug 7 07:06:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11828
------- Additional Comments From benko at sztaki dot hu 2003-08-07 07:06 -------
Looking at PR 11808, I think it's different, since this problem vanishes
if at the point of the call all overloads are seen.
What's more, namespaces are not needed at all to reproduce this bug:
hydra:~/c/proba$ cat templ_overload.cc
template <typename T> void f(T a) {a.f();}
template <typename T> void g(T a) {::f(a);}
struct s {};
void f(s) {}
int main()
{
g(s());
return 0;
}
hydra:~/c/proba$ g++-cvs templ_overload.cc
templ_overload.cc: In function `void f(T) [with T = s]':
templ_overload.cc:3: instantiated from `void g(T) [with T = s]'
templ_overload.cc:11: instantiated from here
templ_overload.cc:1: error: 'struct s' has no member named 'f'
zsh: exit 1 g++-cvs templ_overload.cc
hydra:~/c/proba$
But let's see what happens.
More information about the Gcc-bugs
mailing list