CppCon 2019 has ended
Friday, September 20 • 10:30 - 11:30
std::midpoint? How Hard Could it Be?

Log in to save this to your schedule, view media, leave feedback and see who's attending!

The standards committee adopted "P0811: Well-behaved interpolation for numbers and pointers" for C++20.
It includes a new library call `std::midpoint`.
The paper says "The simple problem of computing a value between two other values is surprisingly subtle in general."

In this talk, I will explore this simple call, provide a history of the development in libc++, and show some of the pitfalls.
Undefined behavior will rear its ugly head, along with numeric representations, and the arcane C promotion rules.

Along the way, we'll talk about testing, and why writing extensive tests helps everyone.


Friday September 20, 2019 10:30 - 11:30 MDT
Crest 3