Improving our safety with a quantities and units library

Mateusz Pusz

90
beginner
intermediate
advanced
11:00-12:30, Wednesday, 3rd July 2024

Safety has been a huge buzzword in the C++ Community in recent years. There are many concerns about the safety of our C++ language, and projects developed using it. Many improvements are being discussed, starting from handling of the low-level fundamental types, through updating the language rules (e.g., initialization), up to providing safer high-level abstractions in the library.

This lecture presents how the usage of a Modern C++ quantities and units library can improve the safety of the code we write every day. During the talk, Mateusz will describe all issues and possible solutions discussed in P2981: Improving our safety with a physical quantities and units library. Based on the examples developed with the mp-units project, the attendees will not only learn the obvious benefits of using such a library but also some less known safety features will be presented.

During the talk, we will see typical issues of code bases that do not use a proper library. We will also learn about various mishaps in engineering that happened through the ages and were caused by human errors in handling quantities and their units. We will also see how they can be easily and safely addressed using the mp-units library.

In the end, Mateusz will describe which issues can't be solved by the quantities and units library itself for now. He will review a list of potential extensions to the C++ language and its library that would allow even more safety in our projects.

units
dimensions
dimensional analysis

Mateusz Pusz

A software architect, principal engineer, and security champion with over 20 years of experience designing, writing, and maintaining C++ code for fun and living. A trainer with over 10 years of C++ teaching experience, consultant, conference speaker, and evangelist. His main areas of interest and expertise are Modern C++, code performance, low latency, safety, and maintainability.

Mateusz worked at Intel for 13 years, and now he is a Principal Software Engineer and the head of the C++ Competency Center at EPAM Systems. He is also a founder of Train IT, which provides dedicated C++ trainings and consulting services to corporations worldwide.

Mateusz is a contributor and an active voting member of the ISO C++ Committee (WG21), where, together with the best C++ experts in the world, he shapes the future of the C++ language.