A Kaleidoscope of C++ Lambdas
summary
Covers concrete lambda evolution and gotchas across C++11→C++26: shows how init captures let you move-only capture and how C++14 adds generic lambdas and parameter packs, C++17 adds copy-of-this and constexpr closure, C++20 brings explicit template parameters and better forwarding, and C++23 finally enables self-referential lambdas in C++23 for recursion. Demonstrates immediate invocation for constexpr/global initialization, replacement of std::bind with lambdas, and the frequent bug where capture defaults bite by capturing the surrounding object by reference, with fixes and idiomatic patterns.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 2:29Lambda history
- 10:11How lambdas work
- 15:16Lambda capture pitfalls
- 17:45Lambdas C++11 to C++23
- 34:28Advanced lambda captures
- 41:31Practical applications of lambdas
- 59:14Conclusion & Q&A
related talks
01h 04mC++ Lambda Idioms
01h 26mLet's Look at Lambdas
01h 00mC++: λ Demystified
56mC++ Lambda Idioms
52mBack to Basics: Lambdas from Scratch
07mLightning Talk: Into the Lambdaverse — The Beginning
05mLightning Talk: Into the Lambdaverse - Weird C++ Lambda Shenanigans
01h 01mC++ Insights: How stuff works, Lambdas and more!
