So according to this question it is preferable to implement many operators as external functions rather than member functions. So far I gather that this is because "it makes code more symetrical"... although I haven't yet figured out why that might be advantageous other than it looks nice. I'm guessing when using templates, it means you can get away without writing lots of code?
Anyway, what I wanted to know is: Is it ever appropriate to implement something like operator<
as a member function? Or are there no advantages to this?
Reason I ask is because I would never have thought to implement such an operator as an external function. In many examples I have seen before, operators are always implemented as member functions. Is implementing them externally a recent idea which is now considered to be "better"?
(PS: Would someone please clarify why external implementations are the way to go?)
Edit: Actually I have found this link - people seem to disagree about what the best methods is and why.