https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91418
--- Comment #5 from Harald van Dijk <harald at gigawatt dot nl> --- (In reply to Darrell Wright from comment #4) > The weird part is, other than compilers don't agree, but the lookup finds it > if you put the template argument in The idea there seems to be that `class A;` declares a local or nested class, but `A;`, `class A<T>;`, `class ::A;` do not, and `friend` does not change that. This is not something I can find support for in the standard though.