[Bug c++/30431] failure to check for visible declaration of friend function to template class

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Sun Feb 11 03:55:00 GMT 2007



------- Comment #3 from bangerth at dealii dot org  2007-02-11 03:55 -------
As one data point: if it indeed finds the local function foo, then one
could think that declaring the friend as
  friend T ::foo<>(const CTest &test);
might work (note the explicit global scope on the function name). Alas:

bangerth/x> /tmp/bangerth/bin/bin/gcc -c x.cc 
x.cc:20: error: non-template 'foo' used as template
x.cc:20: note: use 'T::template foo' to indicate that it is a template
x.cc:20: error: type 'T' is not derived from type 'CTest<T>'

I must admit that I don't really know what the compiler is trying to
tell me here, it certainly doesn't make much sense...

W.


-- 


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



More information about the Gcc-bugs mailing list