In the Google C++ Style Guide, the section on Operator Overloading recommends against overloading any operators (\"except in rare, special circumstances\"). Specifi
Except for the more fundamental types, the less-than operation isn't always trivial, and even equality may vary from situation to situation.
Imagine the situation of an airline that wants to assign all passengers a boarding number. This number reflects the boarding order (of course). Now, what determines who comes before who? You might just take the order in which the customers registered – in that case, the less-than operation would compare the check-in times. You might also consider the price customers paid for their tickets – less-than would now compare ticket prices.
… and so on. All in all, it's just not meaningful to define an operator <
on the Passenger
class although it may be required to have passengers in a sorted container. I think that's what Google warns against.