25.9.2
This website uses cookies to ensure you get the best experience on our website. Learn more

First-class Functions in C++: Using Lambdas & Closures

Skillsoft issued completion badges are earned based on viewing the percentage required or receiving a passing score when assessment is required. 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.

Issued on

March 4, 2023

Expires on

Does not expire