Full name of submitter (unless configured in github; will be published with the issue): Jim X
Consider this example:
int main(){
int a =1, b=2;
int c = a + b;
}
The evaluation of the expression a+b, IIUC, will comprise these sub-evaluations:
- the value computation of
a, let's call it A
- the value computation of
b, let's call it B
- the value computation that computes the result of the operator
+, let's call it S
- the evaluation that initializes the result object
c, let's call it I
We do have a rule that specifies the sequence between the first three evaluations; that is, [intro.execution] p10
The value computations of the operands of an operator are sequenced before the value computation of the result of the operator.
However, we seem not to explicitly specify how S is sequenced with I. Intuitively, the computed result value should be stored into the context of the prvalue as its result as per [basic.lval] p5
The result of a prvalue is the value that the expression stores into its context;
It's reasonable that S should be sequenced before I; however, two evaluations will be unsequenced if there is no explicit specification.
Suggested Resolution:
Full name of submitter (unless configured in github; will be published with the issue): Jim X
Consider this example:
The evaluation of the expression
a+b, IIUC, will comprise these sub-evaluations:a, let's call itAb, let's call itB+, let's call itSc, let's call itIWe do have a rule that specifies the sequence between the first three evaluations; that is, [intro.execution] p10
However, we seem not to explicitly specify how
Sis sequenced withI. Intuitively, the computed result value should be stored into the context of the prvalue as its result as per [basic.lval] p5It's reasonable that
Sshould be sequenced beforeI; however, two evaluations will be unsequenced if there is no explicit specification.Suggested Resolution: