Function Extraction with Lambda Expressions
summary
Shows a concrete recipe to extract code by wrapping the fragment in an immediately-invoked lambda, compile, then iteratively remove captures so the compiler reveals the exact parameters needed. Demonstrates this on a map update example where wrapping isolates initialization and lets the compiler force the return type, then converting captures to function parameters lets one copy the body into a free function and decide by-value or by-reference and const qualification. Mentions variants for member functions and templates.
AI-written summary · about
related talks
01h 00mC++: λ Demystified
01h 04mC++ Lambda Idioms
56mC++ Lambda Idioms
01h 26mLet's Look at Lambdas
01h 00mA Kaleidoscope of C++ Lambdas
01h 03mHigher order functions for ordinary C++ developers
01h 01mC++ Insights: How stuff works, Lambdas and more!
07mLightning Talk: Into the Lambdaverse — The Beginning
