It’s possible to specify overloaded functions as friend
s of a class. Each function intended to be a friend
must be explicitly declared in the class definition as a friend
of the class.
Software Engineering Observation 9.12
Even though the prototypes for friend functions appear in the class definition, friends are not member functions.
Software Engineering Observation 9.13
Member access notions of private, protected and public are not relevant to friend declarations, so friend declarations can be placed anywhere in a class definition.
Good Programming Practice 9.4
Place all friendship declarations first inside the class definition’s body and do not precede them with any access specifier.