Cpp Coding Standards/FDESIGN/CanOp
Canonical Operators (CanOp)
If you overload an operator, always give it its canonical signature and semantic, that is the same one, as if it would be manipulating integers.
Assignment operators return a non const reference:
T & T::operator=(const T &);
If you provide an arithmetical operator, provide the assignment form as well. That is together with
T T::operator+(const T &) const;
T & operator+=(const T &);
Boolean operators always return bool, not int:
bool operator<(const T&, const T&);
The shift operators << and >> are usually overloaded in a different way, not resembling their use on integers.
The operators &&, || and , (comma) should never be overloaded.