From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2005-09-21 11:04:20
On 9/21/05, Thomas Matelich <matelich_at_[hidden]> wrote:
> On 9/21/05, Thorsten Ottosen <nesotto_at_[hidden]> wrote:
> > I don't get it. If you put BOOST_ASSERT( false ) anywhere, then you
> > effectively say "never exceute this code". Otherwise there is an error
> > in the assertion itself.
> > So I don't see how it can break anything.
> > (The effect of removing an assertion must not be any in a correct
> > program).
> This is a very academic argument, in real life code that should never happen
> does and breaking code which tried to be robust to that is a bad idea.
> Personally, though, I'd probably want a #define to use old behavior until I
> could validate __assume won't break it.
IMO, this is not a very academic argument. In an assertion the code
can really never happen. If it can sometimes happen, then it shouldnt
be an assertion, but should throw an exception. Although I agree with
you that it should have a #define for the old behavior, or maybe it
should only use __assume if it's #defined something, like Marcin
proposed in his response to Thorsten.
-- Felipe Magno de Almeida Developer from synergy and Computer Science student from State University of Campinas(UNICAMP). Unicamp: http://www.ic.unicamp.br Synergy: http://www.synergy.com.br "There is no dark side of the moon really. Matter of fact it's all dark."
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk