Document number:  P0400R0
Date:  2016-06-25
Project:  Programming Language C++
Reference:  ISO/IEC IS 14882:2014
Reply to:  William M. Miller
 Edison Design Group, Inc.
Audience:  All

Wording for Order of Evaluation of Function Arguments

In the 2016-06-24 plenary session of WG21, paper P0145R3 ("Refining Expression Evaluation Order for Idiomatic C++") was adopted, except that the alternative wording for 5.2.2 [] paragraph 4 describing the indeterminate sequencing of function argument evaluation was adopted instead of the wording from the primary proposal:

The value computation and associated side-effect of the postfix-expression are sequenced before those of the expressions in the expression-list. The initializations of the declared parameters are indeterminately sequenced with no interleaving.

This wording had not been considered by the Core Language Working Group during its review of the proposal. Having now reviewed this wording, CWG believes that the following wording would be preferable to implement the expressed intent of the modified proposal and requests the project editor to apply this version instead of the wording from P0145R3:

The postfix-expression is sequenced before each expression in the expression-list and any default argument. The initialization of a parameter, including every associated value computation and side effect, is indeterminately sequenced with respect to that of any other parameter.