Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[util.smartptr.shared.assign] assign from auto_ptr&& is in the wrong paragraph #211

Closed
BoPersson opened this issue Oct 7, 2013 · 4 comments
Assignees

Comments

@BoPersson
Copy link

shared_ptr assignment has two groups of assignments, assignment from lvalue (paragraphs 1-3) and assignment from rvalue (paragraphs 4-5).

operator=(auto_ptr&&) is shown in the first group, but the Effects clause is not valid for that operator. It belongs in the second group of operators.

@BoPersson BoPersson reopened this Oct 7, 2013
jwakely added a commit to jwakely/draft that referenced this issue Oct 7, 2013
@jwakely
Copy link
Member

jwakely commented Oct 7, 2013

Good point, those effects won't even compile. Additionally, paragraphs 6 & 7 are identical to paragraphs 4 & 5 (except for a missing period) so the assignment from unique_ptr<Y,D>&& could also be combined with the other assignments from rvalues. Stefanus, do you agree with the change in commit f4632bf?

jwakely added a commit to jwakely/draft that referenced this issue Aug 5, 2014
Combine descriptions of all assignments from rvalues, as paragraphs 4-5
are identical to paragraphs 6-7.

Reported by Bo Persson. Fixes cplusplus#211
@jwakely jwakely self-assigned this Aug 5, 2014
jwakely added a commit to jwakely/draft that referenced this issue Aug 5, 2014
Combine descriptions of all assignments from rvalues, as paragraphs 4-5
are identical to paragraphs 6-7 except for a missing period.

Reported by Bo Persson. Fixes cplusplus#211
@jwakely
Copy link
Member

jwakely commented Aug 5, 2014

@zygoloid do you agree that 9a9e39c is editorial?

@zygoloid
Copy link
Member

Yes, I agree that this matches the clear and unambiguous intent, and it seems clear to me that the note in paragraph 3 should not apply to the auto_ptr case.

I'm on the fence about merging p4+5 with p6+7 -- while they have the same effects, they notionally mean different things, since p6 and p7 transform a uniquely-owned pointer into a shared-ownership one, whereas p4 and p5 merely transfer shared ownership. I'm happy to leave this choice to your discretion. =)

@jwakely
Copy link
Member

jwakely commented Aug 25, 2015

auto_ptr has been removed from the draft, so this issue is no longer relevant (except for the missing period, which I'll fix now).

@jwakely jwakely closed this as completed Aug 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants