Overview
Explore techniques for building robust C++ interfaces that minimize accidental misuse in this conference talk from C++ on Sea 2023. Learn how to leverage the C++ type system to push precondition violation detection from run-time to compile-time, reducing opportunities for bugs in user code. Discover design strategies for distinguishing precondition categories, preventing interface misuse through type-based techniques, and examining the trade-offs of this approach. Gain insights into creating portable code and exposing complex functionalities through simple, richly-typed interfaces as presented by Andreas Weis, an experienced C++ developer and library writer.
Syllabus
Intro
Motivation
Overview
Type System to the rescue!
Structuring arguments
Structured Data Access
Declarative Interface
Execution Tokens
Scoped Execution Contexts
Complex State Machines
The GoF State Pattern
Conclusion
Taught by
cpponsea