Modern C++: Lambdas
47mIntermediate2024-03-21
Authors

Nina Ranns
Course details
The course provides an introduction to a modern C++ feature called lambdas, which allows developers to create function definitions in place that can be passed around and used in your code. Lambdas improve code readability and make it easier to use standard library algorithms. The course does not require any previous knowledge of lambdas, but does require a basic understanding of C++ notions such as function calls, variables, scope of definition, and standard library. Join instructor Nina Ranns as she offers insights into the fundamentals of lambda syntax and use, with examples of how to use lambdas with standard library algorithms, lambda captures, closure types, generic lambdas, and more.
Skills covered
Software Design PatternsC++Programming LanguagesOpen SourceSoftware DevelopmentOne-Off
Concepts
0. Introduction
- 01 - Be a C++ Lambda MVP
1. Lambda Basics
- 02 - What is a lambda
- 03 - Lambda syntax
- 04 - Closure type and closure objects
- 05 - Lambdas and standard library algorithms
- 06 - Conversion to function pointer
2. Lambda Capture
- 07 - Lambda capture
- 08 - Init captures
- 09 - Capturing this
- 10 - Mutable lambdas
3. Closure Type Deep Dive
- 11 - Understand the closure type
- 12 - Lambda exception specification
- 13 - Lambdas and compile time evalution
4. Generic Lambda
- 14 - Generic lambda
- 15 - Introduce template parameters
- 16 - Constrain a generic lambda
Conclusion
- 17 - Closure