N4110: Exploring the design space of contract specifications for C++ -- J. Daniel Garcia

A new WG21 paper is available. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N4110

Date: 2014-07-06

Exploring the design space of contract specifications for C++

by J. Daniel Garcia

Excerpt:

This paper explores the design space for introducing contracts as part of the interface of functions and types. The goal is to address the problem of specifying an interface (with special attention to standard library interfaces) making a clear distinction between a contract violation and an explicitly thrown exception. Preconditions and postconditions are attached to function declarations (i.e. to interfaces) rather than to de nitions, and are, in principle, checked before and after a function's de nition is entered. No macros are needed.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.