Skip to content

San Francisco: Generic Lambdas from Scratch

Photo of Armin Pelkmann
Hosted By
Armin P. and Arthur O.
San Francisco: Generic Lambdas from Scratch

Details

Lambdas — even those mysterious C++14 generic lambdas — are really simple to understand when you approach them from the right angle.

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 generic ("auto") lambdas. We'll show how to implement lambdas that keep their own mutable state, and explain the C++17 difference between capturing "[this]" and capturing "[*this]". Finally, we'll show what lambdas are not, by contrasting their behavior with that of std::function.

Arthur has given this talk in several different venues over the past few years; this year it will be slightly updated for C++17. If you'd like to make sure some particular aspect of lambdas is covered this time, feel free to leave a comment below!

Arthur O'Dwyer worked for many years at Green Hills Software, making the world's most optimizing C and C++ compilers. Now he works at Akamai in San Francisco. He is the author of "Mastering the C++17 STL (https://www.packtpub.com/application-development/mastering-c17-stl)" and the principal organizer of the ACCU Bay Area meetup.

Photo of Cpp Bay Area: C++ Programming In and Around Silicon Valley group
Cpp Bay Area: C++ Programming In and Around Silicon Valley
See more events