http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59656
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Tue Jan 28 10:23:27 2014 New Revision: 207180 URL: http://gcc.gnu.org/viewcvs?rev=207180&root=gcc&view=rev Log: 2014-01-28 Jonathan Wakely <jwak...@redhat.com> Kyle Lippincott <spect...@google.com> PR libstdc++/59656 * include/bits/shared_ptr.h (shared_ptr): Add new non-throwing constructor and grant friendship to weak_ptr. (weak_ptr::lock()): Use new constructor. * include/bits/shared_ptr_base.h (_Sp_counted_base::_M_add_ref_lock_nothrow()): Declare new function and define specializations. (__shared_count): Add new non-throwing constructor. (__shared_ptr): Add new non-throwing constructor and grant friendship to __weak_ptr. (__weak_ptr::lock()): Use new constructor. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error. * testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/shared_ptr.h trunk/libstdc++-v3/include/bits/shared_ptr_base.h trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/void_neg.cc