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

C++    |    Expert
  • 9 videos | 55m 17s
  • Includes Assessment
  • Earns a Badge
Rating 4.5 of 8 users Rating 4.5 of 8 users (8)
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 course
    Recognize lambdas and recall their syntax
    Create and invoke lambdas
    Pass lambdas into functions
    Use lambdas with standard template library (stl) algorithms
  • Define and work with lambda closures
    Capture variables and use default capture by copy
    Capture variables by reference and from member methods
    Summarize the key concepts covered in this course

IN THIS COURSE

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.

YOU MIGHT ALSO LIKE

Rating 3.7 of 21 users Rating 3.7 of 21 users (21)
Rating 3.9 of 8 users Rating 3.9 of 8 users (8)
Rating 4.4 of 11 users Rating 4.4 of 11 users (11)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.1 of 9 users Rating 4.1 of 9 users (9)
Rating 4.4 of 9 users Rating 4.4 of 9 users (9)
Rating 4.2 of 111 users Rating 4.2 of 111 users (111)