Function Contracts in Practice Using C++
Explore function contracts in C++ and their practical implementation in this comprehensive ACCU 2023 conference talk. Delve into the importance of well-designed function APIs, focusing on handling arguments outside the function's domain. Learn why narrow contracts with preconditions are often preferable to wide ones, and discover how contract-checking facilities can reduce software defects and improve maintainability. Examine the elements of function contracts, reasons for preconditions, and various contract types. Investigate contract violation handling, documentation styles, and scaling contract checking in real-world software. Gain insights from speaker Rostislav Khlebnikov, an experienced C++ software engineer and active member of the C++ Standards Committee, as he shares practical examples and design considerations for implementing function contracts effectively.