What are lambda expressions in C++11 and later?
Show answer and explanation
A lambda expression creates an unnamed closure object whose call operator contains the written body. Its capture list can copy or reference surrounding entities, use init-capture, or capture nothing; parameters may be typed or use auto for a generic lambda. Entities captured by copy cannot be modified through the closure's default const call operator unless the lambda is mutable, and only captureless lambdas convert directly to compatible function pointers.
A lambda expression creates an unnamed closure object whose call operator contains the written body. Its capture list can copy or reference surrounding entities, use init-capture, or capture nothing; parameters may be typed or use auto for a generic lambda. Entities captured by copy cannot be modified through the closure's default const call operator unless the lambda is mutable, and only captureless lambdas convert directly to compatible function pointers.
Connect the conclusion directly to the type, lifetime, ownership, overload-resolution rule, or library contract present in the question. State implementation dependence or a violated precondition explicitly instead of merely guessing output.