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: "mmitchel at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Oct 2005 00:16:07 -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 #3 from mmitchel at gcc dot gnu dot org 2005-10-03 00:16 -------
Until DR228 the name following ".template" had to be a member template, so the
code would have been invalid on those grounds.
However, even after DR228, I don't think this is valid code.
The name lookup done after ".template" must include templates in the global
scope; DR 228 makes that clear.
EDG 3.6 rejects the program in its strict mode, as well, giving two messages:
"pr24161.cpp", line 7: error: name following "template" must be a member
template
t.template f< int >();
^
"pr24161.cpp", line 7: error: too few arguments for class template "f"
t.template f< int >();
^
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24161