2014-01-28 Jonathan Wakely <jwakely@redhat.com>
commit1a0a355eb31cedbcac3345e370b5426beff87b4c
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Jan 2014 10:23:27 +0000 (28 10:23 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Jan 2014 10:23:27 +0000 (28 10:23 +0000)
tree2784f59b8c4a0e29330cec40f45e3c91d147a2c8
parent64eb97fb1c1654613b466628922d61e82a945122
2014-01-28  Jonathan Wakely  <jwakely@redhat.com>
    Kyle Lippincott  <spectral@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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207180 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/shared_ptr.h
libstdc++-v3/include/bits/shared_ptr_base.h
libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
libstdc++-v3/testsuite/20_util/shared_ptr/cons/void_neg.cc