https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91618
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- >From Bug 88725 gcc fails to deduce that the friend declaration refers to ::func<int> in the below ``` template <typename T> void func(T); class Cls { friend void ::func(int); }; ``` Rejecting with ``` error: 'void func(int)' should have been declared inside '::' friend void ::func(int); ^ ``` I believe this should be allowed by [temp.friend]/1.3: http://eel.is/c++draft/temp.friend#1.3 see discussion here: https://stackoverflow.com/q/54055575/1013719