I've seen that, if you have operator<
, you can implement, say, operator>=
as !(a < b)
. However, when I went to the C++ Committee in Bristol, they said that you can implement all the comparison operators this way. Particularly, when considering types which have non-trivial comparison operators (consider an arbitrarily long string, especially if this is Unicode), this can be done with only one call to operator<
. I cannot conceive of how this could be done.
How can I implement operator>
and operator<=
with just one call to operator<
and none to the other comparison operators?