
7 Jul
2004
7 Jul
'04
11:51 p.m.
Rob Stewart wrote:
[...] Thus, any expression using commas must be understood to have indeterminant order of evaluation.
Are you sure?
Consider:
int v[] = { foo(), bar() };
Doesn't this exhibit the same problem? If so, the problem is only that an initialization library exposes the problem to more daylight. [...]
But consider: int v = foo(), bar(); I agree that expecting more order-of-initialization than you get is a problem, but the funny thing is that the comma operator gives you more than other uses of the comma. Dave