The original error was allowing a nonsense comparison. Which is greater, 10 or fish? If you permit asking this question, you'll occasionally get weird results.
I can just hear it now: "It helps to think of variable conversions in comparisons as a 'cloud' of value probabilities instead of a discrete value"
Define X < Y, and then derive the rest:
X > Y : X < Y
X == Y: !(X < Y) && !(Y > X)
X != Y: !(X == Y)
X >= Y: !(X < Y)
X <= Y: !(Y < X)
That's why it's the only operator that needs to be defined for std::map/set (which are rb-trees) in C++
Now, if X and Y aren't the same type, the only thing you can expect to get out of the system is a cronenberg.
Only for totally ordered sets [1]. Floating-point numbers, for example, are not totally ordered, because !(NaN == NaN).
But then again, you can avoid having to make intertype comparisons in the first place by following reasonable guidelines. As funny as this case is, I can't imagine how I'd run into it in practice.