[libcxx-commits] [libcxx] [libcxx][test-support] Improve thread_unsafe_shared_ptr (PR #195932)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 15 04:29:27 PDT 2026
================
@@ -393,21 +393,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) TEST_NOEXCEPT
----------------
frederick-vs-ja wrote:
I _guess_ lack of `noexcept` was intentional. Could we revert `TEST_NOEXCEPT` addition and change in `libcxx/test/std/strings/basic.string/string.cons/move_noexcept.pass.cpp` for now? I'm now handling the "workaround" in a new PR.
https://github.com/llvm/llvm-project/pull/195932
More information about the libcxx-commits
mailing list