Boost logo

Boost :

Subject: Re: [boost] A PP trick to define a synchronized blockjava-like macro
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-01-21 06:32:20


----- Original Message -----
From: "Peter Bartlett" <pete_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, January 21, 2009 9:46 AM
Subject: Re: [boost] A PP trick to define a synchronized blockjava-like macro

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

Hi,

Thanks John for the if else suggestion. I like it.
Could some of you point where FOREACH use these tricks?

Thanks,
Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk