~/talk

Function Extraction with Lambda Expressions

Talkat CppCon 2019 · 2019-09-15..09-20· [c-and-cpp, functional-programming]
links:none on file
slides:none on file

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

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.