C++ developers traditionally use function objects (or functors) to encapsulate behavior in a general way that makes it easy to pass as a parameter or store for later invocation. The syntax to do this is verbose since it requires a class/struct that overloads the member function ‘operator()’. C++11 added lambda expressions to create this type of construct directly with far less code. Lambda expressions are defined inside a function which means they have access to the local variables and parameters in that context, something that is hard to achieve using functors. In this webcast, Bradley Needham introduces lambda expressions. He will cover their syntax, local-variable capture modes, closures, and changes from C++11 to 14.
Upcoming Live Webcast:
|SQL Server Software Development Best Practices||Tuesday, October 7, 2014 9:00am PDT|