Title
There is no ability to supply an allocator for the control block when constructing a shared_ptr from a unique_ptr
Status
new
Section
[util.smartptr.shared.const]
Submitter
United States

Created on 2017-02-03.00:00:00 last changed 82 months ago

Messages

Date: 2017-07-15.23:15:19

[ 2017-07 Toronto Thurs Issue Prioritization ]

Priority 3; Alisdair to provide wording

Date: 2017-02-03.00:00:00
Addresses US 130

There is no ability to supply an allocator for the control block when constructing a shared_ptr from a unique_ptr. Note that no further shared_ptr constructors need an allocator, as they all have pre-existing control blocks that are shared, or already have the allocator overload.

Proposed change: Add an additional shared_ptr constructor, template <class Y, class D, class A> shared_ptr(unique_ptr<Y, D>&& r, A alloc), with the same semantics as the existing constructor taking a unique_ptr, but using the alloc argument to supply memory as required.

History
Date User Action Args
2017-07-15 23:15:19adminsetmessages: + msg9392
2017-02-03 00:00:00admincreate