I have been reading through the C++ FAQ and was curious about the friend
declaration. I personally have never used it, however I am interested in exploring the language.
What is a good example of using friend
?
Reading the FAQ a bit longer I like the idea of the <<
>>
operator overloading and adding as a friend of those classes. However I am not sure how this doesn’t break encapsulation. When can these exceptions stay within the strictness that is OOP?