The unordered version of the operator is trivial, but slower -
it allocates pointers to each of the elements in each of the containers,
then sorts the pointers via the values they point to, then does a
standard == left-hand/right-hand compare via the pointers.
This means (a) == allocates, (b) == is slower due to jumping around in
memory and not necessarily following element sequence.
My opinion is that it should have one, and if it does, the expectation is that it is unordered.
For most containers (other than string), I rarely use its comparison operators, but when I need them, they are very handy.
We are supposed to be designing a coherent standard library, and all the containers in the standard library are equality comparable. This should not be a snowflake.
How does the complexity compare with the complexity of unordered_multiset::operator==?
--