This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24588] Fails to identify template using local classes
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2005 01:08:15 -0000
- Subject: [Bug c++/24588] Fails to identify template using local classes
- References: <bug-24588-6594@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from igodard at pacbell dot net 2005-10-31 01:08 -------
Well, the actual argument type is wholely resolved at point of call. And the
formal parameter type is valid at the point where sort is defined. It will
recognize A<int> as an A<E>, it will recognize A<int>* as an A<E>*, and it
should
(I think) recognize A<int>::iterator as an A<E>::iterator. It is true that if
main() were a template then the call would be subject to being hijacked by a
later
specialization of A, but main() is a plain function and the rule is that it
sees
the specializations it sees. And sort(), being a function, cannot be
specialized.
That makes it unambiguous to me. You?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24588