8sa1-gcc/libstdc++-v3/include
Jonathan Wakely 945151b7f1 libstdc++: Simplify std::shared_ptr construction from std::weak_ptr
The _M_add_ref_lock() and _M_add_ref_lock_nothrow() members of
_Sp_counted_base are very similar, except that the former throws an
exception when the use count is zero and the latter returns false. The
former (and its callers) can be implemented in terms of the latter.
This results in a small reduction in code size, because throwing an
exception now only happens in one place.

libstdc++-v3/ChangeLog:

	* include/bits/shared_ptr.h (shared_ptr(const weak_ptr&, nothrow_t)):
	Add noexcept.
	* include/bits/shared_ptr_base.h (_Sp_counted_base::_M_add_ref_lock):
	Remove specializations and just call _M_add_ref_lock_nothrow.
	(__shared_count, __shared_ptr): Use nullptr for null pointer
	constants.
	(__shared_count(const __weak_count&)): Use _M_add_ref_lock_nothrow
	instead of _M_add_ref_lock.
	(__shared_count(const __weak_count&, nothrow_t)): Add noexcept.
	(__shared_ptr::operator bool()): Add noexcept.
	(__shared_ptr(const __weak_ptr&, nothrow_t)): Add noexcept.
2020-10-21 21:13:41 +01:00
..
backward libstdc++: Add deprecated attributes to old iostream members 2020-08-19 12:13:23 +01:00
bits libstdc++: Simplify std::shared_ptr construction from std::weak_ptr 2020-10-21 21:13:41 +01:00
c Update copyright years. 2020-01-01 12:51:42 +01:00
c_compatibility Update copyright years. 2020-01-01 12:51:42 +01:00
c_global libstdc++: Add parentheses around assignments used as truth values 2020-09-10 17:09:16 +01:00
c_std Update copyright years. 2020-01-01 12:51:42 +01:00
debug libstdc++: Replace use of reserved name that clashes [PR 97362] 2020-10-10 21:22:12 +01:00
decimal Update copyright years. 2020-01-01 12:51:42 +01:00
experimental libstdc++: Introduce new headers for C++20 ranges components 2020-09-22 15:45:54 +01:00
ext libstdc++: Make allocators throw bad_array_new_length on overflow [LWG 3190] 2020-10-05 15:18:56 +01:00
parallel libstdc++: Add compile-time checks to__glibcxx_assert [PR 71960] 2020-09-01 20:52:26 +01:00
precompiled libstdc++: Remove unused header 2020-10-19 11:19:28 +01:00
pstl libstdc++: Rebase include/pstl to current upstream 2020-10-21 06:11:28 -07:00
std libstdc++: Make structured bindings always work for subranges [PR 97512] 2020-10-21 14:40:54 +01:00
tr1 Update copyright years. 2020-01-01 12:51:42 +01:00
tr2 Update copyright years. 2020-01-01 12:51:42 +01:00
Makefile.am libstdc++: Introduce new headers for C++20 ranges components 2020-09-22 15:45:54 +01:00
Makefile.in libstdc++: Introduce new headers for C++20 ranges components 2020-09-22 15:45:54 +01:00