Lecture: mp-units: Lessons learned and a new library design
This lecture presents how Modern C++ features enable exciting features and attractive new design possibilities.
mp-units is a Modern C++ library that provides compile-time dimensional analysis and unit/quantity manipulation. It heavily uses C++20 features like concepts and values of class types used as non-type template parameters (NTTPs). Also, it introduced a new powerful technique called the Downcasting Facility.
During the talk, the library's author will describe the significant challenges with the initial design. He will explain the issues with the Downcasting Facility and why user-defined literals (UDLs) are not a good choice for creating quantities, and what the alternatives are. Mateusz will also describe additional requirements that couldn't be addressed with the previous framework and present how the new design addresses them. We will also see many C++20 and some C++23 features in action :-) In the end, we will discuss potential C++ language features that could be helpful to improve the design of this and similar libraries.
Start time: 11:30
Room: Bristol II / Bristol Suites
Track: General C++
Click here to let us know how you liked this event.