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!
Tuesday, October 3 • 14:00 - 15:00
by Chip Hogg
Summary of the talk:
We present Au: a new open-source C++ units library, by Aurora. If you've rejected other units libraries because they couldn't meet your needs, check out Au (pronounced, "ay yoo"). It combines cutting-edge developer experience (fast compilation, simple and readable compiler errors) with wide accessibility (C++14 compatibility, single-header delivery option). You can be up and running with Au in your project --- in any build system --- in less time than it takes to read this abstract!
We'll orient the viewer by providing a decision framework for choosing a units library, and using this framework to compare several leading options. We'll also see how these libraries influence each other. For example, Au has several compelling features inspired by other libraries, such as the concise and readable compiler errors of mp-units, and the frictionless single-header delivery of the nholthaus library --- in fact, Au is the first library to provide both these features at once. Au has also provided many new features of its own, including: fully unit-safe APIs; an adaptive "overflow safety surface" that governs unit conversions; on-the-fly composition for units and prefixes; smart, unit-aware rounding and inverse functions; and more.
Finally, Au has a notably low barrier to migration --- in either direction. We'll explain how to set up a correspondence between Au and any other units library. Even though neither library knows about the other, you'll be able to pass Au-typed variables to APIs which take the other library's types, and vice versa. This doesn't just make it easy to switch to Au; it promises a smooth upgrade path to any better library which comes along later (such as a future C++ standard units library). With such a low barrier to entry, give Au a try, and find out what it feels like to get effortlessly correct handling for all your physical quantities!