CppCon 2023 Exploration of Strongly-typed Units: A Case Study from Digital Audio -- Roth Michaels

Registration is now open for CppCon 2023! The conference starts on October 1 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2023!

Exploration of Strongly-typed Units: A Case Study from Digital Audio

Wednesday, October 4 • 14:00 - 15:00

by Roth Michaels

Summary of the talk:

API or math mistakes with units can cause problems ranging from a digital audio processing outputting silence to crashing your Mars rover—we’ll discuss real-life examples of both!

The combination of user-defined types, conversion operators/constructors, and operator overloading in C++ give us the tools to use strong-types and avoid unit mistakes; std::chrono is a great example of this that everyone should be using. Unfortunately, when dealing with units beyond time many developers still use primitive types encoding units in variable names or comments because the standard does not offer any tools for user-defined units.

In this talk we will look at the mp-units library which has been proposed for standardization in P1935 (A C++ Approach to Physical Units). We will look at the implementation of various units used in digital audio / DSP that go beyond “physical” units and what the experience is like to develop your own units with this library/proposal.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.