From: Andrei Alexandrescu \(See Website for Email\) (andrewalex_at_[hidden])
Date: 2004-07-07 22:10:23
"Darren Cook" <darren_at_[hidden]> wrote in message
> >>I'm not sure which of a/b/c I am, but if I saw the below code I would be
> >>surprised if foo() was not evaluated before bar(). If it was a function:
> >> f( foo(), bar() );
> >>would foo() always be executed before bar()?
> > No. This is a common misconception and a common source of bugs that only
> > when optimizations are turned on. It's also a source of exception-unsafe
> > as detailed in Exceptional C++ and a GOTW column.
> That kind of validates using v+=foo(),bar(); then, but also says why you
> shouldn't use it: a common source of bugs.
> I think with an initialization library in particular people will write,
> expect to always work, something like:
> v+= get(), get(), get();
Were issues such as these brought during the review?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk