The comma operator introduces a sequence point and, as such, this behavior is guaranteed by the C++ standard.
to the last expression c while {a; b; c;} is a sequence of statements, ...
The comma operator is no different from simply two statements separated by ; in this respect. The language specifies the semantics of the ...
Regular expressions library (C++11)
The comma operator has the lowest precedence of any C operator,
At specific points during execution, known as sequence points, all side effects of ... statement ( if or switch ); The controlling expression of a while or do statement ... Not all instances of a comma in C code denote a usage of the comma operator.
A pair of expressions separated by a comma is evaluated left-to-right;
The comma operator (,) evaluates each of its operands (from left to
The behaviour of the comma operator can surprise you when you encounter it in code.
than at execution time ( when errors are usually more costly to