945151b7f1
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. |
||
---|---|---|
.. | ||
config | ||
doc | ||
include | ||
libsupc++ | ||
po | ||
python | ||
scripts | ||
src | ||
testsuite | ||
acinclude.m4 | ||
aclocal.m4 | ||
ChangeLog | ||
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.