Skip to content
Snippets Groups Projects
Commit 090589e8 authored by Jonathan Wakely's avatar Jonathan Wakely
Browse files

libstdc++: Deprecate std::atomic_xxx overloads for std::shared_ptr

These overloads are deprecated in C++20 (and likely to be removed for
C++26). The std::atomic<std::shared_ptr<T>> specialization should be
preferred in new code.

libstdc++-v3/ChangeLog:

	* include/bits/shared_ptr_atomic.h (atomic_is_lock_free)
	(atomic_load_explicit, atomic_load, atomic_store_explicit)
	(atomic_store, atomic_exchange_explicit, atomic_exchange)
	(atomic_compare_exchange_strong, atomic_compare_exchange_weak)
	(atomic_compare_exchange_strong_explicit)
	(atomic_compare_exchange_weak_explicit): Add deprecated
	attribute for C++20 and later.
	* testsuite/20_util/shared_ptr/atomic/1.cc: Suppress deprecated
	warnings.
	* testsuite/20_util/shared_ptr/atomic/2.cc: Likewise.
	* testsuite/20_util/shared_ptr/atomic/3.cc: Likewise.
	* testsuite/29_atomics/atomic/lwg3220.cc: Likewise.
parent 64bcf3f0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment