C++17之前是UB。C++17确定了顺序:赋值操作符的右侧操作数先序于左侧。所以左侧得到的是自减后的值。故而array[j + 1] = array[j--];一般等价于(并发例外)array[j] = array[j];
--j;8.18.1[expr.ass] ...In all cases, the assignment is sequenced after the value computation of the right and left operands, and before the value computation of the assignment expression. The right operand is sequenced before the left operand...