using may precede any expression designating a
modifiable lvalue — a call that returns a reference, a subscript, not
just an identifier.
Today
With P3817
Same assignment, no library call — and the destinations are no longer function arguments.
In std::tie(foo(), s[0]) both destinations are function
arguments, and argument evaluation has no order:
The initialization of a parameter or, if the implementation introduces any temporary objects to hold the values of function parameters, the initialization of those temporaries, including every associated value computation and side effect, is indeterminately sequenced with respect to that of any other parameter. — [expr.call] ¶8
No library wording can impose one, and std::tuple’s
assignment does not sequence the assignments either.
With P3817 they are not arguments. Each element is resolved in
lexical order: foo() is evaluated and assigned before
s[0] is evaluated.