Order of evaluation in C++ function parameters
No, there’s no such guarantee. It’s unspecified according to the C++ standard. Bjarne Stroustrup also says it explicitly in “The C++ Programming Language” 3rd edition section 6.2.2, with some reasoning: Better code can be generated in the absence of restrictions on expression evaluation order Although technically this refers to an earlier part of the same … Read more