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]

Re: Possible bug in shared_ptr(unique_ptr) constructor?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]