$ 11.4 / 5 - "[...] The friend function defined in the class is in the (lexical) scope of the class in which it is defined [...]"
What does this operator mean?
struct A{ typedef int MYINT; void f2(){f();}
What is not clear here is that calling "f" from "A :: f1" is understandable. However, why is the call "f" from "A :: f2" poorly formed when a friend is in the "lexical" range of the friend class? What does the lexical domain mean?
In the same type, why is the use of 'MYINT' in 'f' OK? Shouldn't it be "A :: MYINT"?
If I add a parameter like "A *" to "f", then both "f1" and "f2" can find "f" due to ADL. It's clear.
c ++ friend
Chubsdad
source share