[PATCH] libstdc++: Implement C++20 atomic<shared_ptr> and atomic<weak_ptr>
Stephan Bergmann
sbergman@redhat.com
Mon Jan 17 09:39:52 GMT 2022
On 1/17/22 01:12, Jonathan Wakely via Libstdc++ wrote:
> Here's the finished version of that patch, which is all inline in the
> header, and performs faster too.
>
> Tested powerpc64le-linux and x86_64-linux.
> Pushed to trunk.
FYI, recent Clang still requires typename in two places to compile
<memory> with -std=c++20,
> diff --git a/libstdc++-v3/include/bits/shared_ptr_atomic.h b/libstdc++-v3/include/bits/shared_ptr_atomic.h
> index 900499bae32..50aa46370ca 100644
> --- a/libstdc++-v3/include/bits/shared_ptr_atomic.h
> +++ b/libstdc++-v3/include/bits/shared_ptr_atomic.h
> @@ -456,8 +456,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> typename _Tp::element_type* _M_ptr;
> _Atomic_count _M_refcount;
>
> - static _Atomic_count::pointer
> - _S_add_ref(_Atomic_count::pointer __p)
> + static typename _Atomic_count::pointer
> + _S_add_ref(typename _Atomic_count::pointer __p)
> {
> if (__p)
> {
More information about the Libstdc++
mailing list