C++17 introduced the following rules for the order of evaluation:
Left-to-right Evaluation
:C++17 guarantees that subexpressions within an expression are evaluated from left to right
. This means that the leftmost subexpression is evaluated first, followed by the next subexpression on the right, and so on.Sequenced Before Relationship
: If two subexpressions within an expression are not directly related by a common sequence point, C++17 guarantees that they will be evaluated in an order that is either left-to-right or according to the dependencies imposed by the expressions themselves.Function Call Sequencing
: When you call a function, evaluations related to the arguments of the called function are evaluated before the evaluation of called function.Indeterminately Sequenced Expressions
: C++17 allows for expressions that are indeterminately sequenced. This means that the ord