Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ordered_set: operator<: Fix for a case of strict inclusion.
When all elements compared so far in sets `x` and `y` have been equivalent and one of the sets (`x`) ends, but the other one (`y`) does not end (i.e. `x` is a strict prefix of `y`), we used to get `y < x`, but with this changeset we are going to get `x < y`. Example (in pseudocode) (with case-insensitive comparison): we used to get `{'A', 'b'} > {'a', 'B', 'c'}`, now fixed to `{'A', 'b'} < {'a', 'B', 'c'}`. This is similar to how `std::lexicographical_compare` behaves.
- Loading branch information