by loup-vaillant · 10y ago · 0 comments
In this particular example the evaluations and effects are allowed to be interleaved:
pre = I + 1; // evaluating the pre-increment
post = I; // evaluating the post-increment
I++; // effect of pre-increment
I++; // effect of post-increment
return pre + post; // evaluating the sum
Simply put, pre and post-increment are allowed to occur "simultaneously".