O'Reilly logo

Extended STL, Volume 1: Collections and Iterators by Matthew Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Contract Programming

 

Notions of responsibility are importantly preventive.

 
 --Professor Martin Seligman
 

Emergency! Emergency! There’s an emergency going on!

 
 --Holly, Red Dwarf

Contract programming is the business of expressing the expected and allowed behaviors of software components as contracts and of including constructs to verify adherence to these contracts in your code. This chapter briefly covers the aspects of contract programming that pertain to the content of this book and Volume 2; I’ve included on the CD some articles I’ve written on the subject, within which my perspective on, and rationale for, the use of contract programming in C++ is clearly spelled out, in case you want to jump in with both feet.

It’s important to realize ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required