3 ms·
It is of some note that the order execution/passing of arguments to a C++ function is yet to be defined. For example, Whatdoesitdo (i++, i)
by frozenport 12y ago
It is of some note that the order execution/passing of arguments to a C++ function is yet to be defined. For example,
Whatdoesitdo (i++, i)
- kenrose 12y agoTo pick nits, the order is defined: it's defined as being unspecified (Section 5.2.2).
- frozenport 12y agoUndefined is the opposite of defined, and threading in C++98 was `not considered` or `unaddressed`?
- robmccoll 12y agoGiven post increment, to me whatdoesitdo(i,i) then i = i+1 seems most likely. The whatdoesitdo(++i,i) case seems a bit more ambiguous once you add named parameters with reordering. Clang actually warns you if you try to do this. C or C++.
- milliams 12y agoThere is a proposal to fix this for C++17 http://isocpp.org/files/papers/n4228.pdf http://isocpp.org/files/papers/n4228.pdf