[libcxx-commits] [libcxx] [libc++] Remove UB from std::map __tree_node construction (PR #153908)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Aug 31 18:15:42 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;
----------------
frederick-vs-ja wrote:
> I think we can just remove this line. Possibly also the the default constructor?
Seems like that the default constructor needs to be explicitly defaulted. Otherwise, it won't exist because the implementation will be suppressed.
> I believe the reason I had to add these was because I got errors like these:
I don't think we need to explicitly declare the destructor.
https://github.com/llvm/llvm-project/pull/153908
More information about the libcxx-commits
mailing list