This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24161] [3.4/4.0/4.1 Regression] Lookup of template member function finds global type.
- From: "anthony dot ajw at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Oct 2005 21:43:13 -0000
- Subject: [Bug c++/24161] [3.4/4.0/4.1 Regression] Lookup of template member function finds global type.
- References: <bug-24161-5876@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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