
7 Jul
2004
7 Jul
'04
11:22 p.m.
In article <40EC84D1.5060604@dcook.org>, Darren Cook <darren@dcook.org> wrote:
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 show up when optimizations are turned on. It's also a source of exception-unsafe code, as detailed in Exceptional C++ and a GOTW column. meeroh -- If this message helped you, consider buying an item from my wish list: <http://web.meeroh.org/wishlist>