Please rotate your tablet to be horizontal.

You can dismiss this notice but please note that this experience has not been designed for mobile devices and so will be less than optimal

Back To Schedule

The Dark Corner of STL

MinMax Algorithms

09:35 - 10:05 Wednesday 14th September 2022 MDT Summit 1 / Online E
Beginner
Intermediate
Advanced
Templates & Metaprogramming

How many problems could one possibly run into when calling a simple algorithm such as std::min?

In this talk, we will take a deep dive into the ergonomics of min-max algorithms and explore several language features in the process:
• reference semantics and lifetime issues
• const correctness and use of const_cast
• costs of using the std::initializer_list

We will finish by exploring the options for addressing these issues when implementing functions with similar semantics.

Šimon Tóth

Šimon Tóth

Ex-Software Engineer and ex-Researcher turned content creator.

Currently on a mission to share my 20 years' worth of Software Engineering experience with the world.