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++/17152] Useless error message


------- Additional Comments From bangerth at dealii dot org  2004-08-23 14:07 -------
I think the error message is actually quite clear: you try to make 
something a friend which isn't known: for a friend declaration, if 
name lookup doesn't find an existing name, and if it is a declaration 
of either a function or a function template, then this injects the 
name into the surrounding namespace. However, this doesn't apply for 
a function template specialization, as in your case, if the actual 
template declaration isn't available. Thus the compiler complains 
that you are trying to declare something you can't declare (a non-function, 
non-template). It should be obvious that the compiler can't do anything 
about it unless you provide a declaration of the general template. 
 
I leave it to others to decide whether we want to keep this PR and if so 
how to change the error message. I personally would vote for closing it. 
 
W. 

-- 


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


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