~/talk

Contracts for C++

Talkat ACCU 2025 · 2025-04-01..04-04· [c-and-cpp, software-architecture]
links:none on file
slides:none on file

A Contracts MVP is approved for C++26 and ships as C++26 Contracts MVP providing three assertion kinds: contract_assert plus pre/post function assertions on declarations, a new <contract> API with contract_violation (location, semantic, exception_ptr) and a replaceable global handler, and four evaluation semantics (ignore, observe, enforce, quick_enforce). GCC and Clang have working implementations on Compiler Explorer (see paper P33460), compilers control semantics per TU or runtime, and roadmap items (always-enforce, implicit checks, captures, virtual/post rules) target C++29.

AI-written summary · about

  1. 0:00C++26 contract assertions intro
  2. 10:20What contracts replace
  3. 21:14C++26 contracts roadmap
  4. 29:52Design by contract history
  5. 45:06Why contracts took 21 years
  6. 1:01:20Writing contract assertions rules
  7. 1:12:50Contracts and undefined behavior
  8. 1:20:16Future directions for contracts
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.