[libcxx-commits] [PATCH] D61878: Change how containers are compared
Duncan P. N. Exon Smith via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 12 08:02:41 PDT 2023
dexonsmith added a comment.
In D61878#4644316 <https://reviews.llvm.org/D61878#4644316>, @ldionne wrote:
> [Github PR transition cleanup]
>
> This patch doesn't seem correct to me: unordered containers are not ordered, so I don't think we can do a linear walk of `__first1` and `__first2`, compare elements side by side and draw any conclusion from that. Abandoning.
Looks to me like this patch is correct. It uses the linear walk as a "fast path" to ignore the prefix of the two containers that are both in the same order and equal, then reverts to the pre-existing slow path for the out-of-order (or unequal) suffix.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61878/new/
https://reviews.llvm.org/D61878
More information about the libcxx-commits
mailing list