Title
unique_ptr assignment effects w.r.t. deleter
Status
c++14
Section
[unique.ptr.single.asgn]
Submitter
Jonathan Wakely

Created on 2013-03-13.00:00:00 last changed 130 months ago

Messages

Date: 2013-09-29.10:21:48

Proposed resolution:

This wording is relative to N3485.

  1. Edit [unique.ptr.single.asgn] paragraph 2:

    unique_ptr& operator=(unique_ptr&& u) noexcept;
    

    […]

    -2- Effects: Transfers ownership from u to *this as if by calling reset(u.release()) followed by an assignment fromget_deleter() = std::forward<D>(u.get_deleter()).

  2. Edit [unique.ptr.single.asgn] paragraph 6:

    template <class U, class E> unique_ptr& operator=(unique_ptr<U, E>&& u) noexcept;
    

    […]

    -6- Effects: Transfers ownership from u to *this as if by calling reset(u.release()) followed by an assignment fromget_deleter() = std::forward<E>(u.get_deleter()).

Date: 2013-09-15.00:00:00

[ 2013-09-29, Chicago ]

Apply to Working Paper

Date: 2013-04-15.00:00:00

[ 2013-04-20, Bristol ]

Move to Ready

Date: 2013-03-13.00:00:00

The Effects clauses for unique_ptr assignment don't make sense, what is the target of "an assignment from std::forward<D>(u.get_deleter())"?

Obviously it's intended to be the deleter, but that isn't stated clearly.

History
Date User Action Args
2014-02-20 13:20:35adminsetstatus: wp -> c++14
2013-09-29 10:21:48adminsetmessages: + msg6653
2013-09-29 10:21:48adminsetstatus: voting -> wp
2013-09-23 13:24:31adminsetstatus: ready -> voting
2013-04-20 08:17:49adminsetmessages: + msg6497
2013-04-20 08:17:49adminsetstatus: new -> ready
2013-03-17 22:05:35adminsetmessages: + msg6399
2013-03-13 00:00:00admincreate