rsmith added a comment. Sorry, I don't think this approach can work. Consider:
template<typename T> struct X { template<typename U> friend void f(T); template<typename U> friend void f(U); }; These two friend declarations declare different friend function templates, but this transformation would incorrectly make them have the same type and be redeclarations of each other. I think the right thing here is to just accept that a friend function template declared within a class template will not be part of the corresponding redeclaration chain. But that's fine, so long as we don't try to inject the function template into the surrounding scope -- when we come to instantiate the class template, the instantiated friend function template will have the right type and will be part of the relevant redeclaration chain. http://reviews.llvm.org/D19336 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits