Support for most/all contract programming features - February 21, 2010
Pre-release
Pre-release
- Removed use of self, variable.now, and variable.old in writing contracts. Object this and variables are now accessed as usual in member functions. CONTRACT_OLDOF(variable) is used to access old values in postconditions.
- Added (precondition), (postcondition), and (body) to specify contracts within the function signature sequence. If no preconditions then (precondition) ({...}) is simply omitted from the sequence (same for postconditions, body is mandatory instead). For non-void functions, users can name the result argument with (postcondition) (result-name) ({...}).
- Changed contract class template to use same syntax as Boost.Function (i.e., F function type).
- Added support for free functions and static member functions.
- Added support for subcontracting with multiple inheritance.
- Added static class invariants which are always checked (also at constructors entry, destructor exit, and by static member functions).
- Added block invariants and Eiffel-like loop variants.
- Added handlers to customize action on contract failure (default to std::terminate()).
- Removed feature for automatic contract documentation using Doxygen (this is not compatible with added (precondition), (postcondition), and (body) because Doxygen preprocessor is not capable to handle Boost.Preprocessor sequences).
- Rewritten entire documentation (now using Boost.QuickBook instead of Doxygen).