This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On 29 October 2013 21:33, Jonathan Wakely wrote:
> This change fixes the unique_ptr<void> testcase in the PR while
> preserving the extension that we allow initializing a shared_ptr from
> a unique_ptr that uses a custom pointer.
>
> I've added a test for that extension, and for assignment of
> enable_shared_from this.
>
> 2013-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
>
> PR libstdc++/58839
> * include/bits/shared_ptr_base.h
> (__shared_ptr<T>::__shared_ptr(unique_ptr<U,D>&&)): Only use addressof
> when unique_ptr<U,D>::pointer is not a built-in pointer type.
> * testsuite/20_util/shared_ptr/cons/58839.cc: New.
> * testsuite/20_util/enable_shared_from_this/members/assign.cc: New.
> * testsuite/20_util/enable_shared_from_this/members/unique_ptr.cc: New.
>
> Tested x86_64-linux, committed to trunk.
For the 4.8 branch I'm committing this simpler form, which just
disables the extension:
PR libstdc++/58839
* include/bits/shared_ptr_base.h
(__shared_ptr<T>::__shared_ptr(unique_ptr<U,D>&&)): Do not dereference
pointer.
* testsuite/20_util/shared_ptr/cons/58839.cc: New.
Attachment:
patch.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |