[Bug c++/38850] Cannot find inline friend function in template class when called from within a template function

2009-01-14 Thread nvachhar at google dot com


--- Comment #1 from nvachhar at google dot com  2009-01-14 20:53 ---
Created an attachment (id=17103)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17103action=view)
Test case program


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38850



[Bug c++/38850] Cannot find inline friend function in template class when called from within a template function

2009-01-14 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2009-01-14 21:24 ---
I think this code is invalid as the call to Max is not going to be dependent as
the arguments are not dependent and can be looked up at the time the function
is defined.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38850



[Bug c++/38850] Cannot find inline friend function in template class when called from within a template function

2009-01-14 Thread nvachhar at google dot com


--- Comment #3 from nvachhar at google dot com  2009-01-14 21:30 ---
(In reply to comment #2)
 I think this code is invalid as the call to Max is not going to be dependent 
 as
 the arguments are not dependent and can be looked up at the time the function
 is defined.
 

I don't think I follow.  While the arguments to Max are not dependent, other
code inside of foo could be dependent on T (in the example, no such code
exists).  Shouldn't the fact that the function can be looked up at definition
time make this code legal?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38850