Loading…
CppCon 2019 has ended
Friday, September 20 • 10:30 - 11:30
Back to Basics: Lambdas from Scratch

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

Lambdas — even C++14's mysterious "generic lambdas" — are just syntactic sugar atop constructs that are perfectly understandable when approached from the right direction.

We'll start with the implementation of C-style functions, then move to overloading, function templates, non-static member functions, C++11 lambdas, and then demystify C++14's generic lambdas. We'll cover the minor changes to lambdas in C++17, such as the ability to capture `*this` by value, and indicate some of the minor changes coming in C++2a. Finally, we'll detour into the implementations of std::function and std::bind to show how they're different from lambdas.

Attendees will leave this session with a clear understanding of how C++ — a language without dynamic typing or garbage collection — can nevertheless support efficient lambda closures.

Speakers
avatar for Arthur O'Dwyer

Arthur O'Dwyer

C++ Trainer
Arthur O'Dwyer is the author of "Mastering the C++17 STL" (Packt 2017) and of professional training courses such as "Intro to C++," "Classic STL: Algorithms, Containers, Iterators," and "The STL From Scratch." (Ask me about training your new hires!) Arthur is occasionally active on... Read More →


Friday September 20, 2019 10:30 - 11:30 MDT
Aurora D