Category Archives: Uncategorized

Working with C++0X/C++11: Lambdas – part 3 – introducing closures

Closure In computer science, a closure (also lexical closure, function closure, function value or functional value) is a function together with a referencing environment for the non-local variables of that function. A closure allows a function to access variables outside … Continue reading

Posted in C++0X/C++11, Uncategorized | 1 Comment

Working with C++0X/C++11: Lambdas – part 2 – Scope Capture

Since a lambda is a local function defined with a scope (i.e. inside another function) it can have access to the same variables that are in that scope. This is where the capture-mode comes in. (Perversely, this prevents lambdas from … Continue reading

Posted in C++0X/C++11, Code, Uncategorized | Leave a comment