[all-commits] [llvm/llvm-project] 9b197b: [libc++] Introduce a escape hatch for the changed ...
Louis Dionne via All-commits
all-commits at lists.llvm.org
Thu Mar 5 09:25:07 PST 2026
Branch: refs/heads/release/22.x
Home: https://github.com/llvm/llvm-project
Commit: 9b197b5596bcd567da31c1bf6d3c1b096b2cead8
https://github.com/llvm/llvm-project/commit/9b197b5596bcd567da31c1bf6d3c1b096b2cead8
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2026-03-05 (Thu, 05 Mar 2026)
Changed paths:
M libcxx/docs/ReleaseNotes/22.rst
M libcxx/include/__tree
M libcxx/include/__utility/lazy_synth_three_way_comparator.h
A libcxx/test/libcxx/containers/associative/debug.non-strict-weak-ordering.pass.cpp
A libcxx/test/libcxx/containers/associative/lower_upper_bound_non_strict_weak_order.pass.cpp
Log Message:
-----------
[libc++] Introduce a escape hatch for the changed behavior of map and set search operations (#183190)
In #155245, we implemented an optimization to std::map and std::set
search operations. That optimization took advantage of something that is
guaranteed by the Standard, namely that the comparator provided to the
associative container is a valid strict weak ordering.
Sadly, some code in the wild did not satisfy this requirement, such as
Boost.ICL: boostorg/icl#51
Since this can have extremely tricky runtime consequences, this patch
introduces a temporary escape hatch for the LLVM 22 release that allows
reverting to the previous behavior. It also explicitly calls out the
change in the release notes, adds some regression tests and adds debug
mode support for catching some of these invalid predicates.
Fixes #183189
(cherry picked from commit 5de92856bd6c238eb703202a8934f03480e80ee5)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list