C/C++
cppcont.txt
Associated article: Programming with Contracts in C++
Tags: C/C++
Published source code accompanying the article by Christopher Diggins in which he explains Programming with Contracts--a method of developing software using contracts to explicitly state and test design requirements.
Programming with Contracts in C++
by Christopher Diggins
Listing One
template <typename T>
struct SortableIntArray_contract : public T {
bool SortRange(int i, int j) {
// preconditions
assert(i >= 0);
assert(i < size());
assert(j >= i);
assert(j &...


