Home > Workshops >

Modern C++ Interface Design

Ben Saks - Available in 2 days, 15 hours and 5 minutes (2024-04-30 10:00 EDT)

Modern C++ Interface Design
Ben Saks

Prerequisite: Solid knowledge of C, C++ classes, and traditional C enumeration types, as well as a basic understanding of simple C++ templates.

Good interface design is an important part of writing safe, reliable software. By writing interfaces that are easy to use correctly, we let software engineers communicate clearly and reduce maintenance costs. By using the type system to write interfaces that are hard to use incorrectly, we can catch many potential errors at compile time and improve development time.

In this session, we’ll take an existing C++ interface and look at how we can improve on it using Modern C++ features. We’ll see how Modern C++ lets you write enumeration types that avoid common problems and misuses. We’ll discuss new library types and language features that help you write interfaces with more convenient parameter passing and return conventions. We’ll also examine how you can use C++ attributes like [[nodiscard]] to get more feedback from your compiler and catch mistakes earlier in development.

  • scoped enumerations and underlying type specifiers
  • explicit conversion operators
  • attributes (e.g., [[deprecated]], [[nodiscard]], [[fallthrough]], etc.)
  • structured bindings
  • std::optional
  • std::expected
M↓ MARKDOWN HELP
italicssurround text with
*asterisks*
boldsurround text with
**two asterisks**
hyperlink
[hyperlink](https://example.com)
or just a bare URL
code
surround text with
`backticks`
strikethroughsurround text with
~~two tilde characters~~
quote
prefix with
>

No comments or questions yet. Will you be the one who will break the ice?

OUR SPONSORS

OUR PARTNERS