|This rule is Obsolete|
|Synopsis:||Friends of a class should be avoided|
|Category:||Object Oriented Programming|
It is unadvised to use friend classes or functions, because it makes the design of a class less clear. The class behavior is not only defined by the class implementation itself, but also by its friends. This makes it harder to maintain the class.
An exception to this rule are friend operator functions, which can only be implemented outside a class.