Lambda Expressions

Learn about the basics of lambda expressions and get an idea of what we'll cover in this chapter.

We'll cover the following

The C++11 standard introduced the lambda expression (sometimes called the lambda function, or just lambda). This feature allows an anonymous function to be used in the context of an expression. Lambdas may be used in function calls, containers, variables, and other expression contexts. It may sound innocuous, but it’s remarkably useful.

A lambda is essentially an anonymous function as a literal expressionA literal expression is a representation of a value in code that is written directly as it appears in the program, rather than being computed or evaluated.:

Get hands-on with 1400+ tech skills courses.