]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix assigning nullptr to std::atomic<shared_ptr<T>> (LWG 3893)
authorJonathan Wakely <jwakely@redhat.com>
Wed, 22 Mar 2023 21:54:24 +0000 (21:54 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 22 Mar 2023 23:13:40 +0000 (23:13 +0000)
commita495b738e4a89a8104798d005fd09474bbb916ff
tree0bc1a5f1432c4f6c3ff07be78a3024efc912cb7d
parent6b2740946d26ffde7e1318f24bae00443ece387d
libstdc++: Fix assigning nullptr to std::atomic<shared_ptr<T>> (LWG 3893)

LWG voted this to Tentatively Ready recently.

libstdc++-v3/ChangeLog:

* include/bits/shared_ptr_atomic.h (atomic::operator=(nullptr_t)):
Add overload, as per LWG 3893.
* testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
Check assignment from nullptr.
libstdc++-v3/include/bits/shared_ptr_atomic.h
libstdc++-v3/testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc