[Bug c++/24161] [3.4/4.0/4.1 Regression] Lookup of template member function finds global type.
anthony dot ajw at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Oct 4 21:43:00 GMT 2005
------- Comment #9 from anthony dot ajw at gmail dot com 2005-10-04 21:43 -------
The name following "t." must be the name of a member of either T, or one of its
base classes.
t.template f<int> can only refer to a global template f if it is then followed
by a nested name specifier (e.g. t.template f<int>::X) so that it is a
qualified name for member of T.
This is just the same as t.f always refers to a member, even if there is a
non-member f in scope, unless one writes t.f::X (for some X).
t.template f<int>() can thus only refer to a member template, and the global
template should not be considered.
--
anthony dot ajw at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anthony dot ajw at gmail dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24161
More information about the Gcc-bugs
mailing list