Boost logo

Boost :

Subject: Re: [boost] A PP trick to define a synchronized block java-like macro
From: Peter Bartlett (pete_at_[hidden])
Date: 2009-01-21 03:46:37

Quoting John Bytheway <jbytheway+boost_at_[hidden]>:

> 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.

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