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]
Other format: [Raw text]

[Bug c++/11828] [3.4 regression] qualified dependent name looked up too early


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.


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