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