Loading…
CppCon 2020 has ended
Wednesday, September 16 • 13:30 - 14:30
Constructing Generic Algorithms: Principles and Practice

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

Feedback form is now closed.
"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.

Speakers
avatar for Ben Deane

Ben Deane

Quantlab
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 progr... Read More →


Wednesday September 16, 2020 13:30 - 14:30 MDT
destroy_n()