First-class Functions in C++: Using Lambdas & Closures
C++
| Expert
- 9 videos | 55m 17s
- Includes Assessment
- Earns a Badge
In C++, a lambda expression is an ad-hoc, locally scoped function object that offers a function definition syntax. Lambdas can be stored in variables and invoked like function objects or function pointers, but lambdas go further by supporting context capture. In this course, learn how to define and invoke lambda functions and pass and return input arguments to and from lambdas using the Standard Template Library (STL) algorithms. Next, explore how context capture works in lambdas and implement closures. Finally, work with context capture to specify captured variables and whether the capture is by copy or by reference. Upon completion, you'll be able to define and invoke a lambda function, perform context capture by value and by reference, and define closures inside class methods.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseRecognize lambdas and recall their syntaxCreate and invoke lambdasPass lambdas into functionsUse lambdas with standard template library (stl) algorithms
-
Define and work with lambda closuresCapture variables and use default capture by copyCapture variables by reference and from member methodsSummarize the key concepts covered in this course
IN THIS COURSE
-
2m 2s
-
5m 24s
-
6m 38s
-
6m 30s
-
9m 29s
-
5m 21s
-
6m 39s
-
9m 58s
-
3m 16s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.