Quote Originally Posted by TSYS View Post
Yes, Philip's code does what I intended, without the equality that bothers you, Paul.
It's not a matter of bothering me, it's really for your benefit to write comparisons this way (without the test for equality). As mentioned, testing for equality as early as you did is the foundation of badly written comparison operators that ultimately break the strict weak ordering rule, maybe not now, but later if the ordering becomes more complex.

I suggest you take Martin O's code, compile it, run it, and see if it works. If it does work, then it's your job to make it not work by adding something to it and repost the changed example. Or if not that, figure out what the code he posted does and your's doesn't do.

Regards,

Paul McKenzie