
On 9/15/05, Simon Buchan <simon@hand-multimedia.co.nz> wrote:
Felipe Magno de Almeida wrote: So... you want asserts to assure the compiler that the expression should be impossible? I can't think of too many times that would actually generate better code, and may be a source of unexpected behaviour, but better minds than I should think about it, I guess.
Yes. I think that almost always unexpected behavior is already the case when an assertion is violated. IMO, assertions should be invariants, and as such should never(and I mean really never) be violated, no matter what. The only way I can see variants could be broken are through bugs in the library, improper use or incorrect synchronization(which is an improper use). What I'm only suggesting is using these already thought and coded invariants to be used for optimization. Maybe could have be a define in boost that could do enable this, and have the default behavior as this optimisation disabled. But more opinions would be really better in this case. best regards, -- 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."