[Bug c++/11828] [3.4 regression] qualified dependent name looked up too early
benko at sztaki dot hu
gcc-bugzilla@gcc.gnu.org
Mon Aug 11 07:04: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-11 07:04 -------
Well, yes, the global namespace is a namespace,
but now everything is in the same namespace.
I think I've found the ultimate testcase
(the filename became non-descriptive):
hydra:~/c/proba$ cat templ_overload.cc
template <typename T> void g(T a) {::f(a);}
hydra:~/c/proba$ g++-cvs templ_overload.cc
templ_overload.cc: In function `void g(T)':
templ_overload.cc:1: error: `::f' has not been declared
zsh: exit 1 g++-cvs templ_overload.cc
hydra:~/c/proba$
(And let me add that workaround 2, though works, forces
a coding style where everything is included as late as
possible, that is, #include's are not grouped at the beginning
of a file but scattered throughout.)
More information about the Gcc-bugs
mailing list