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

20.8.1.2.5 [unique.ptr.single.modifiers]/4 should say "if and only if" #248

Closed
StephanTLavavej opened this issue Dec 17, 2013 · 0 comments
Closed
Assignees

Comments

@StephanTLavavej
Copy link
Contributor

N3797 20.8.1.2.5 [unique.ptr.single.modifiers]/4 says: "assigns p to the stored pointer, and then if the old value of the stored pointer, old_p, was not equal to nullptr, calls get_deleter()(old_p)."

It should say "if and only if" in order to be absolutely clear that the deleter won't be called with a null pointer.

(I believe that the intention was obvious, so this is editorial. Note that 20.8.1.2.2 [unique.ptr.single.dtor]/2's phrasing is unambiguous: "If get() == nullptr there are no effects. Otherwise get_deleter()(get()).")

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

2 participants