Boost logo

Boost :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2005-09-15 01:08:57

On 9/15/05, Simon Buchan <simon_at_[hidden]> 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).
"There is no dark side of the moon really. Matter of fact it's all dark."

Boost list run by bdawes at, gregod at, cpdaniel at, john at