Earlier quoted context omitted.
I recently encountered code (at work no less) that overloaded the == operator. a.) It was not a const overload. b.) Inside said overload, it modified FOUR member variables. c.) The 'new' keyword was used twice inside said == overload. d.) I learned when gdb fails, to grep the codebase for the 'operator' keyword. I am not a fan of operator overloading. If the SW enginner in question had instead written a equals( rhs)…
Sounds like operator overloading isn't the real problem here. An function equals(T rhs) -> bool that calls new and modifies member variables still sounds pretty terrible; changing "==" to "equals" doesn't fix the problem.
In the named case, it's obvious the other programmer may be doing something nefarious.
In the operator case, you learn much more, like how to grep, really work gdb, etc.