I looked at that item, and I don't think the reasons he gives for preferring non-member non-friend functions apply. Non-member functions that are friends are what compromise encapsulation--not adding an additional member function. As far as I can tell, the difference between a non-member non-friend function and member function is nil as far as encapsulation goes.Originally Posted by Daved
As for the reason that a class may get too bloated and therefore a member function should be made global if possible, that's doesn't strike me as a very compelling reason.
I don't really understand what practical difference it makes to declare the operator function global versus a member function. The author says the <string> class is an example of a bloated class which has 73 member functions some of which could be implemented as global functions. He says those functions would be more widely used if they hadn't been "buried in basic_string". I don't get that. Why would a function be more widely used if it were a global function rather than a member function?