According to C++'s requirements of Compare, any Compare type function should return something that is true if the first arg is less than the second, otherwise false. This named requirement is used in many standard algorithms, e.g. std::sort, std::map, std::set, etc. However, many of them need to judge if two elements are "equal". As the reference says, the standard lib determines a == b iff !comp(a, b) && !comp(b, a). Obviously it needs twice the time to judge equivalence.
As we know, std::string::compare method returns an int value representing "less", "equal" and "greater" by negative value, zero value and positive value respectively. This seems to be a good idea to express the three possible relationships between two values in just one operation. So my question is, why doesn't the standard lib require Compare to return an integer value or any other type that is able to express at least 3 independent values?