[libcxx-commits] [libcxx] [libc++] Optimize __tree::__find_equal (PR #155245)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 25 09:46:20 PDT 2025
================
@@ -702,6 +702,18 @@ public:
# endif
};
+template <class _Key, class _CP, class _Compare>
+struct __three_way_comparator<__enable_specialization_if<__has_three_way_comparator_v<_Compare, _Key, _Key>,
+ __map_value_compare<_Key, _CP, _Compare>>,
+ _Key,
+ _CP> : __three_way_comparator<_Compare, _Key, _Key> {
+ using __base = __three_way_comparator<_Compare, _Key, _Key>;
+
+ _LIBCPP_HIDE_FROM_ABI static int operator()(const _Key& __lhs, const _CP& __rhs) {
----------------
ldionne wrote:
Don't we also need to handle the reverse order of arguments too?
https://github.com/llvm/llvm-project/pull/155245
More information about the libcxx-commits
mailing list