[libcxx-commits] [libcxx] [libc++] Fix exception safety of `__hash_table::__copy_construct` (avoid memory leak) (PR #201452)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 4 01:20:45 PDT 2026


================
@@ -0,0 +1,95 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: no-exceptions
+
+// The frozen C++03 headers use a separate __hash_table that is not affected by this fix, and
+// std::unordered_map::emplace is not available there.
+// UNSUPPORTED: c++03
----------------
philnik777 wrote:

We still want to test that the C++03 implementation is correct. Can't you just use a different way to insert the nodes?

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


More information about the libcxx-commits mailing list