Boost logo

Boost :

From: DEAN STURTEVANT (dean_at_[hidden])
Date: 2000-12-20 14:53:01


--- In boost_at_[hidden], "William Kempf" <sirwillard_at_m...> wrote:
> --- In boost_at_[hidden], "Jeff Paquette" <paquette_at_m...> wrote:
> > Where I work we have three basic assertion macros for design-by-
> contract:
> > Assert, Require, and Ensure. Require's are for preconditional
> checks, Ensure
> > are postconditions, and Asserts are for algorithmic checking (ie,
> in-process
> > states).
>
> How do Require and Ensure differ from Assert? When inheritance
works
> there's an important distinction, but I'm not sure I see a reason
for
> different macros with out this.
>
> Bill Kempf

I can see a use for separating assertions into two flavors: Require
and Assert: A 'Require' would typically trigger due to a bug in
client code, and 'Assert's would trigger due to bugs in library code.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk