There are many advantages of using friend class to increase abstraction and encapsulation of a library. What are the disadvantages of "friend class" in C++/Java? There is a opinion that friend class violates encapsulation, but I feel its quite opposite, friends increase encapsulation.
https://isocpp.org/wiki/faq/friends
Any thoughts why "friend class" should be prohibited?
Aucun commentaire:
Enregistrer un commentaire