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: "redi 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 16:54:59 -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 #4 from redi at gcc dot gnu dot org 2005-10-03 16:54 -------
> Until DR228 the name following ".template" had to be a member template, so the
> code would have been invalid on those grounds.
Erm, the name following .template *is* a member template, that's my whole
point! :-)
I don't understand why DR228 applies, that is about whether non-member
templates can follow the .template syntax, not about whether 3.4.5 para 2
applies to templates. Additionally, I believe the apparently correct behaviour
that resulted in my bug report makes the use of "template" even harder to teach
- something that was apparently a motivation for DR228. It also means that the
template function "f" is dependent on include ordering and whether a global "f"
has been declared.
However, I'll take the question to a more appropriate forum and try to get an
explanation there, rather than banging on about it here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24161