https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122908
--- Comment #7 from Nathaniel Shead <nshead at gcc dot gnu.org> --- ...and the reason the friendFn instantiation in the purview matters is because it's making Class considered decl-reachable, and so we think that the exposure might actually be a problematic one and so complain.
