This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30431] failure to check for visible declaration of friend function to template class
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Feb 2007 03:55:39 -0000
- Subject: [Bug c++/30431] failure to check for visible declaration of friend function to template class
- References: <bug-30431-13734@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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