From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2003-05-08 11:26:05
--- Daniel Frey <daniel.frey_at_[hidden]> wrote:
> Gennaro Prota wrote:
> > On Thu, 8 May 2003 15:06:02 +0300, "John Torjo" <john_at_[hidden]>
> > wrote:
> >>Unfortunately, we can't use the do-while(0) idiom, since we don't know when
> >>while(0) will be ;-)
> > Oops, no. That's not the problem. The problem is that I read Daniel's
> > reply out of context and too absent-mindedly :-) I thought it was
> > something like
> > if (false) ; else
> > whereas he is really testing for a condition
> > if(expr)...
> > However, if you are going to abort at the end (or throw, but I don't
> > want to enter in this matter) you can simply replace 'if' with
> > 'while':
> But that does not give you any benefit at all, does it?
Just that Borland won't warn on BOOST_INVARIANT(false). Admittedly not a big
> do-while-idiom is very different from the while-version you suggest.
Indeed. I did say that I misread your post. Sorry for the noise.
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk