[libcxx-commits] [libcxx] [libc++] Remove UB from `std::map` by updating `std::__tree_node` construction / Update `std::__hash_node` construction (PR #153908)

Vinay Deshmukh via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 3 18:13:07 PDT 2025


================
@@ -572,7 +574,8 @@ public:
 
   _LIBCPP_HIDE_FROM_ABI void __set_parent(pointer __p) { __parent_ = static_cast<__end_node_pointer>(__p); }
 
-  ~__tree_node_base()                                  = delete;
+  _LIBCPP_HIDE_FROM_ABI __tree_node_base()             = default;
+  _LIBCPP_HIDE_FROM_ABI ~__tree_node_base()            = default;
----------------
vinay-deshmukh wrote:

> I don't think we need to explicitly declare the destructor.

THis should be fixed as of 8e9153e5fb88


https://github.com/llvm/llvm-project/pull/153908


More information about the libcxx-commits mailing list