
21 Jan
2009
21 Jan
'09
8:46 a.m.
Quoting John Bytheway <jbytheway+boost@gmail.com>:
if (bool stop_ = false) {} else for (VARS DECLARATION; !stop_; stop_ = true)
which I'd consider more readable (Thanks to BOOST_FOREACH for this trick).
John Bytheway
The other trick in this part of the book is to use nested fors, which can give you slightly more flexibility. FOREACH does this too, IIRC.