Lambda expressions (C++11)
Monomorphic lambdas with captures and closures, conversion to function pointers, reaching scope.
Connected features
Papers
6 · Bellevue 2008 → Pittsburgh 2010Adds lambda expressions with captures and closure objects (monomorphic form). Minutes: '(Revision 4)'.
Makes the closure's call operator const unless the lambda is declared mutable. Core paper.
Removes the std::reference_closure class that an earlier lambda design needed. Report cites N2845; the Summit minutes (N2847) record CWG motion 4 as N2830 'Problems with reference_closure'. N2845 (Crowl/Gregor/Abrahams, 2009-03-05) is the wording paper..
Rewrites the lambda wording to fix a raft of issues before the FCD.
Defines the reaching scope of a lambda and which entities it may capture. Core motion 2.
Makes captureless lambdas convertible to function pointers.