Consider the following code:
How does C++ handle the index evaluation? For example left to right:  is evaluated before , right to left:  is evaluated before  or does this depend on the compiler used?
Strictly speaking, there are a number of evaluations going on in
argv (which is equivalent to
An operator expression can't really be evaluated without knowing what its operands' values are, so #1 and #2 must happen before #4, and #3 and #4 must happen before #5.
Of course, "evaluate
1" doesn't have much meaning since it's just a literal known value. But if the expression were something like
argv[f1()][f2()] instead, then the order of subexpression evaluations can matter.
In versions of C++ up to C++14, it is unspecified in
f2() is called first. C++17 introduced a lot of additional guarantees on the order of subexpressions, including a rule for array subscripting: in
A[B], all evaluations and side effects for subexpression
A now happen before all evaluations and side effects of subexpression
B. So C++17 guarantees in this case that
f1() will be called before