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++/30431] failure to check for visible declaration of friend function to template class



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


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