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

[expr.delete] Specify value category of a delete-expression #7259

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Eisenwave
Copy link
Contributor

I found it surprising that we don't specify the value category here but say:

has type void

http://eel.is/c++draft/basic.lval#1.2 generally makes any expression of type void a prvalue, so this change is editorial only.

I believe it is a slight improvement because it reduces the reader's dependency on that general rule and makes the wording more conventional. We have the tendency to say "prvalue of type void" almost anywhere else, such as in https://eel.is/c++draft/expr.type.conv#2. For better or for worse, that's why I didn't even know about the blanket rule for void up until recently.

Perhaps in the long run, since almost any place specifies that void expressions are pvalues explicitly, we could even turn it into a note:

Note: Expressions of type cv void are always prvalues.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
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

Successfully merging this pull request may close these issues.

None yet

1 participant