This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11828] [3.4 regression] qualified dependent name looked up too early
- From: "benko at sztaki dot hu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Aug 2003 07:06:27 -0000
- Subject: [Bug c++/11828] [3.4 regression] qualified dependent name looked up too early
- References: <20030806091852.11828.benko@sztaki.hu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.