~/talk

C++ Contracts - a meaningful viable product

Talkat Meeting C++ 2025 · 2025-11-06..11-08· [typescript]
slides:none on file

After two decades of proposals, contracts enter C++26 as the P2900R14 Contracts MVP claiming language-level precondition/postcondition and statement-style contract-assert support. The spec specifies pre/post/contract-assert syntax, implicit constification rules, ODR and lambda caveats, four evaluation semantics (ignore/observe/enforce/quick_enforce), repeatable/elidable checks, a replaceable handle_contract_violation hook, and constraints on postcondition capture; GCC and Clang already host experimental implementations on Godbolt.

AI-written summary · about

  1. 0:00C++26 contracts intro
  2. 1:06Speaker intro
  3. 3:56Contract types
  4. 16:31Immutability principles
  5. 26:54Post-condition capture
  6. 31:54Parameter constness
  7. 33:58Contract evaluation
  8. 45:43Violation handler
  9. 54:33Assert return value
  10. 58:51Summary
  11. 59:33Q&A
~/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.