gcc/libstdc++-v3
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
..
config aix: add FAT library support for libstdc++fs.a 2020-10-11 11:47:00 -04:00
doc libstdc++: Update C++20 status documentation 2020-10-13 17:40:43 +01:00
include libstdc++: Simplify std::shared_ptr construction from std::weak_ptr 2020-10-21 21:13:41 +01:00
libsupc++ PR c++/97201 - ICE in -Warray-bounds writing to result of operator new(0) 2020-10-12 09:36:26 -06:00
po
python
scripts libstdc++: Pass CXXFLAGS to check_performance script 2020-10-09 14:01:55 +01:00
src libstdc++: Reduce uses of std::numeric_limits 2020-10-06 00:05:11 +01:00
testsuite libstdc++: Make structured bindings always work for subranges [PR 97512] 2020-10-21 14:40:54 +01:00
acinclude.m4
aclocal.m4
ChangeLog Daily bump. 2020-10-21 00:16:36 +00:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019
config.h.in
configure
configure.ac
configure.host
crossconfig.m4
fragment.am
linkage.m4
Makefile.am
Makefile.in
README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.