From Jason Turner
Watch on YouTube

Summary

In this episode, Jason demonstrates how to implement a variadic version of std::fmin in C++11, revisiting his previous episodes on custom variadic template functions. He shows that the C++17 fold expression technique he used earlier can be adapted to work with C++11 by using a standard initializer list to capture the results of the expansion. This approach not only provides the same functionality for pre-C++17 compilers but also offers interesting possibilities for capturing intermediate comparison results during the variadic template expansion.

Resources

Tags