libstdc++: Fix constexpr constructor for atomic<shared_ptr<T>>
authorJonathan Wakely <jwakely@redhat.com>
Fri, 21 Jan 2022 11:55:22 +0000 (11:55 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 21 Jan 2022 13:21:27 +0000 (13:21 +0000)
commit7d47aae7cd4bb4dbf1e59a52c2a3f127151c8fab
treef4ba2e16e0e524ea4bf2e1a8eb1a8ee89b9b568c
parentcaca8eddd9356777f5fe28454eb083b1779adc26
libstdc++: Fix constexpr constructor for atomic<shared_ptr<T>>

libstdc++-v3/ChangeLog:

* include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count):
Add constexpr.
(_Sp_atomic::_M_ptr): Add default member-initializer.
* testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
Check constant initialization.
* testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: Likewise.
libstdc++-v3/include/bits/shared_ptr_atomic.h
libstdc++-v3/testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc
libstdc++-v3/testsuite/20_util/weak_ptr/atomic_weak_ptr.cc