-
Notifications
You must be signed in to change notification settings - Fork 771
"...denoted by the operand" in [expr.delete] can result in a wrong meaning #4746
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
Comments
I think you mean pointed to, not just pointed. And I don't think you need "the value of the operand". It's fine to say that a pointer points to something, we don't need to talk about the value of the pointer. So "the object pointed to by the operand", or "the object the operand points to" seem OK to me. |
@jwakely Why I use the value of the operand has been discussed in #4662 (comment), we should explicitly specify the meaning. In addition, the value of the operand also implies lvalue-to-rvalue conversion may apply to the operand(if necessary). |
I don't like adding extra words to "clarify" something that is not ambiguous. "The object pointed to by i.e. in cases like this, we already clearly differentiate between "pointer type" and "a value of pointer type". |
It seems that the meaning of "the object pointed to by the operand" is clear. How about the lvalue-to-rvalue implied by "the value of..."? After all, the coversion is under-specified in many section in [expr] that should be specified. |
[expr.delete#11]
The operand of the delete-expression is an unqualified-id
ptr
, the object denoted by theptr
is the object namedptr
(rather than the object pointed byptr
), as per [expr.prim.id.unqual#3] and [basic#pre-5]The expected object in this sentence should be the object pointed by the operand. The original operand of a delete-expression could be of pointer type or class type, but, in either case, the ultimate operand shall have pointer type. So, I think in this sentence, change "the object denoted by the operand" to
might be a more precise utterance.
The text was updated successfully, but these errors were encountered: