A comprehensive talk covering the C++26 contracts feature, explaining why defensive programming matters for functional and memory safety. The presentation covers best practices for using contracts, demonstrates their advantages over C assert (declaration-level usage, release build support, language-level integration), addresses common misconceptions, and explores future evolution including virtual functions and groups/labels. Includes practical guidance on avoiding side effects, handling compound conditions, and implementing throwing violation handlers.
Sort: