Boost logo

Boost :

From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-11-15 16:22:04

In my opinion, assertions indicate enfrorcement of pre/post conditions, that
are separate from the algorithmic logic of a function. What happens from the
result of the assertion, an exception or an abort is a separate issue.

Consider (if assert takes a boost::function0<void>):

assert (!harddrive.isFragmented (), boost::bind (&HardDrive::defrag,

In this case, it there is a simple remedy to the failed pre-condition. The
alternative is: assert (!harddrive.isFragmented (), std::abort);

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