https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101527
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- I find it surprising, but the CWG consensus seems to be that a friend defined inline in the class body is "a member declaration of the befriended class".