[libcxx-commits] [libcxx] [libcxx][test-support] Implement fancy_pointer_allocator (PR #196187)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 5 02:17:56 PDT 2026


================
@@ -421,21 +422,30 @@ namespace detail {
 template <class T>
 class thread_unsafe_shared_ptr {
 public:
-  thread_unsafe_shared_ptr() = default;
-
-  TEST_CONSTEXPR_CXX14 thread_unsafe_shared_ptr(const thread_unsafe_shared_ptr& other) : block(other.block) {
+  // as it's internal and technically not nullable, we don't care about null pointer state
+  // and don't need destructive move
+  TEST_CONSTEXPR_CXX14 thread_unsafe_shared_ptr(const thread_unsafe_shared_ptr& other) // TODO: TEST_NOEXCEPT
+      : block(other.block) {
----------------
frederick-vs-ja wrote:

Do we need to change these lines? I don't think these comments are necessary. Also, why don't add `TEST_NOEXCEPT` right now?

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


More information about the libcxx-commits mailing list