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: "pinskia 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 17:06:25 -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 #6 from pinskia at gcc dot gnu dot org 2005-10-03 17:06 -------
For what is worth Comeau rejects the code:
"ComeauTest.c", line 8: error: name following "template" must be a member
template
t.template f< int >();
^
"ComeauTest.c", line 8: error: too few arguments for class template "f"
t.template f< int >();
^
"ComeauTest.c", line 8: warning: ambiguous class member reference -- function
template "F::f" (declared at line 14) used in preference to class
template "f" (declared at line 2)
t.template f< int >();
^
detected during instantiation of "void call_f(T &) [with T=F]"
Removing the template class above does "fix" it too there.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24161