Video details

Constructing Generic Algorithms: Principles and Practice - Ben Deane - CppCon 2020

English --- "You have all these algorithms at your disposal. *Learn them.*" -- Sean Parent, GoingNative 2013.
Great advice, and the algorithms can do a lot. But they can't do everything, and the fixed set in the standard was never meant to be the last word in every problem. Sometimes we do need to write our own solutions. What are the best practices for that?
This talk examines how to build our own algorithms. We'll start with a raw loop that solves a nontrivial problem, and turn it into a generic algorithm capable of supporting a wide variety of use cases without loss of expressivity or efficiency.
Along the way we'll consider algorithmic patterns, how to structure the interface, how the types interact, iterator category concerns, testing, and more. We'll look at how ranges and concepts help us to refine and focus things.
We'll also see where the existing algorithms fall short, and take a look at some non-obvious use cases, including some minor modifications or wrappings that give us extra flexibility.
--- Ben Deane Quantlab Denver, CO
Ben was in the game industry for 23 years, at companies like EA and Blizzard. For the last couple of years he's been working in the finance industry at Quantlab. He's always looking for useful new techniques in C++, and he geeks out on algorithms, APIs, types and functional programming.
--- Streamed & Edited by Digital Medium Ltd - [email protected]