--- Daniel Frey <[EMAIL PROTECTED]> wrote:
> Gennaro Prota wrote:
> > On Thu, 8 May 2003 15:06:02 +0300, "John Torjo" <[EMAIL PROTECTED]>
> > 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
one :-)

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


Genny.


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to