Contracts for C++
summary
Proposal claims a Contracts MVP targets C++26 with concrete syntax for preconditions postconditions assertions, four evaluation modes (ignore / observe / enforce / quick‑enforce), a link‑time overridable contract violation handler, postconditions that name the returned object, and explicit rules for virtuals and const correctness. Paper finds 196 use cases, deliberately scopes an MVP, and reports working branches in clang and GCC plus Godbolt examples — enough detail to evaluate migration cost, runtime overhead choices, and debugging behavior.
AI-written summary · about
chapters (7)
- 0:00C++ contracts proposal intro
- 10:20What contracts are
- 20:02Core contract concepts
- 33:10Contracts vs assert macros
- 42:06Contracts across translation units
- 51:37Program correctness with contracts
- 1:00:44Future extensions & Q&A
related talks
01h 28mWhat C++ Needs to be Safe
01h 02mTowards Safety and Security in C++26
01h 29mC++ Safety And Security Panel 2024
01h 02mTowards Correctness, Safety and Security in C++26
36mTowards Safety & Security in C++26
10mRuntime Assertions New Paradigm for Customized Contract Security
01h 25mSpeculation in Smart Contracts
06mFormal Verification with the Certora Prover
