Boost logo

Boost :

From: Andrei Alexandrescu \(See Website for Email\) (andrewalex_at_[hidden])
Date: 2004-07-07 18:56:46

"Rob Stewart" <stewart_at_[hidden]> wrote in message
> From: brangdon_at_[hidden] (Dave Harris)
> > In-Reply-To: <cch4as$941$1_at_[hidden]>
> > andrewalex_at_[hidden] (Andrei Alexandrescu \(See Website for Email\))
> > wrote (abridged):
> > > I was worried more (only) about the order of evaluation.
> > >
> > > v += foo(), bar();
> Unless I'm mistaken, there is but one sequence point in such an
> expression, regardless of whether you overload operator,. Thus,
> any expression using commas must be understood to have
> indeterminant order of evaluation.

It is exactly such false sense of security and such misunderstandings that
makes me highly suspicious of overloading the comma operator. Worse,
comments come that have an apparence of legitimacy. Unless I am even more
mistaken, your statement above is false. If that's the case, hey, confusion
is among the inner circle... how about the casual users?

> Consider:
> int v[] = { foo(), bar() };
> Doesn't this exhibit the same problem?



Boost list run by bdawes at, gregod at, cpdaniel at, john at