This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68089] c++ friend with template
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 31 Oct 2015 06:37:02 +0000
- Subject: [Bug c++/68089] c++ friend with template
- Auto-submitted: auto-generated
- References: <bug-68089-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68089
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The error seems correct to me, the function is only a friend of its first
argument, not its second. Friendship is not transitive, just because the
function friends with C<T> and C<T> is friends with C<U> that does not mean the
function is friends with C<U>.