12 Overloading [over]

12.6 Overloaded operators [over.oper]

12.6.2 Binary operators [over.binary]

A binary operator shall be implemented either by a non-static member function ([class.mfct]) with one parameter or by a non-member function with two parameters.
Thus, for any binary operator @, x@y can be interpreted as either x.operator@(y) or operator@(x,y).
If both forms of the operator function have been declared, the rules in [over.match.oper] determine which, if any, interpretation is used.
An equality operator function is an operator function for an equality operator ([expr.eq]).
A relational operator function is an operator function for a relational operator ([expr.rel]).
A three-way comparison operator function is an operator function for the three-way comparison operator ([expr.spaceship]).
A comparison operator function is an equality operator function, a relational operator function, or a three-way comparison operator function.