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.ass] does not specify the type of the expression (and traditionally misuses "result") #4864
Comments
I understand the first part ("type is not specified"), but could you please elaborate on the second part? |
We seem to be not-quite-good with "result" throughout [expr], due to historical reasons. |
Requests to fix such misuses are no (longer) accepted? |
They are. A specific suggestion is appreciated. |
Is the lack of type specification actually a problem, does it cause ambiguities? I'm not opposed to elaborating that, but I'd like to see a little more motivation. |
@tkoeppe, every operator used to construct compound expressions should specify what type and value category the resulting compound expression has, and (when evaluated) what the value resulting from the operation is (plus any side effects etc.) For assignment, we're lacking on the "type" part, which is simply a specification oversight / inconsistency. There's nothing ambiguous here. For example, we say that 1+1 has type "int" (because the operands have type int, and (lots more mechanics)), but we don't say what the type of the compound expression "i = 1" is. |
OK -- "omitted by oversight, inconsistent with other operator specifications" would be sufficient motivation. I'd welcome if that were part of the initial issue report. |
No description provided.
The text was updated successfully, but these errors were encountered: