This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/24588] Fails to identify template using local classes



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]