[libcxx-commits] [libcxx] [libc++] Make __tree::__find_equal public and remove the friend declarations for {, multi}map (PR #133237)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 27 04:57:00 PDT 2025
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/133237
None
>From a4156787e53d63e76ebde38a983d40a336049c82 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Thu, 27 Mar 2025 12:56:38 +0100
Subject: [PATCH] [libc++] Make __tree::__find_equal public and remove the
friend declarations for {,multi}map
---
libcxx/include/__tree | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/libcxx/include/__tree b/libcxx/include/__tree
index 08ae8996f8f7d..6aa2f85264dc1 100644
--- a/libcxx/include/__tree
+++ b/libcxx/include/__tree
@@ -1225,11 +1225,6 @@ public:
_LIBCPP_HIDE_FROM_ABI __node_holder remove(const_iterator __p) _NOEXCEPT;
-private:
- _LIBCPP_HIDE_FROM_ABI __node_base_pointer& __find_leaf_low(__parent_pointer& __parent, const key_type& __v);
- _LIBCPP_HIDE_FROM_ABI __node_base_pointer& __find_leaf_high(__parent_pointer& __parent, const key_type& __v);
- _LIBCPP_HIDE_FROM_ABI __node_base_pointer&
- __find_leaf(const_iterator __hint, __parent_pointer& __parent, const key_type& __v);
// FIXME: Make this function const qualified. Unfortunately doing so
// breaks existing code which uses non-const callable comparators.
template <class _Key>
@@ -1242,6 +1237,12 @@ private:
_LIBCPP_HIDE_FROM_ABI __node_base_pointer&
__find_equal(const_iterator __hint, __parent_pointer& __parent, __node_base_pointer& __dummy, const _Key& __v);
+private:
+ _LIBCPP_HIDE_FROM_ABI __node_base_pointer& __find_leaf_low(__parent_pointer& __parent, const key_type& __v);
+ _LIBCPP_HIDE_FROM_ABI __node_base_pointer& __find_leaf_high(__parent_pointer& __parent, const key_type& __v);
+ _LIBCPP_HIDE_FROM_ABI __node_base_pointer&
+ __find_leaf(const_iterator __hint, __parent_pointer& __parent, const key_type& __v);
+
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI __node_holder __construct_node(_Args&&... __args);
@@ -1311,11 +1312,6 @@ private:
__node_pointer __cache_root_;
__node_pointer __cache_elem_;
};
-
- template <class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS map;
- template <class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS multimap;
};
template <class _Tp, class _Compare, class _Allocator>
More information about the libcxx-commits
mailing list