gemini-2.5-flash-preview-04-17| input-price: 0.15 output-price: 3.5 max-context-length: 128_000 (cost: $0.01) Β· Anfrage: 2025-05-06T19:59:01.828966

Generated by rs-summarizer Version unbekannt

Abstract:

This presentation by Matt Godbolt at C++ on Sea explores techniques for designing C++ APIs using a "correct by construction" approach, aiming to prevent misuse and catch errors at compile time. Drawing on experience in demanding industries, Godbolt demonstrates how to leverage C++ features such as strong value types, enum class, static_assert, RAII (Resource Acquisition Is Initialization), [[nodiscard]] attributes, and r-value reference qualified methods (&&) to create APIs that guide the user towards correct usage and make errors difficult. The talk also highlights the importance of enabling compiler warnings and using static analysis tools. Examples are used from finance, GUI development, and shader compilation.

Designing C++ APIs for Correctness: Leveraging the Compiler

Summary Rating: No ratings yet
Article Rating: No ratings yet

Source