De Morgan’s Law optimization with overloaded operators
Note that: Builtin operators && and || perform short-circuit evaluation (do not evaluate the second operand if the result is known after evaluating the first), but overloaded operators behave like regular function calls and always evaluate both operands. … Because the short-circuiting properties of operator&& and operator|| do not apply to overloads, and because types … Read more