Does this code from “The C++ Programming Language” 4th edition section 36.3.6 have well-defined behavior?
The code exhibits unspecified behavior due to unspecified order of evaluation of sub-expressions although it does not invoke undefined behavior since all side effects are done within functions which introduces a sequencing relationship between the side effects in this case. This example is mentioned in the proposal N4228: Refining Expression Evaluation Order for Idiomatic C++ … Read more