Possible bug in shared_ptr(unique_ptr) constructor?
Jonathan Wakely
jwakely.gcc@gmail.com
Mon Oct 7 23:13:00 GMT 2013
On 7 October 2013 23:21, Daniel Krügler wrote:
>
> While reflecting about the same thing I found a third reason: The
> current specification of this moving transfer means that after the
> construction the programmer can query the free get_deleter template
> and can expect to get the owned deleter (irrespective of
> user-specialization), that is including default_delete<int> for
> example. This is different from querying shared_ptrs that do not *own*
> the deleter.
Oh yes, that's a very good point! The optimisation would be
non-conforming in all cases.
More information about the Libstdc++
mailing list