~/talk

Generalized fold expressions

Talkat C++Now 2017 · 2017-05-15..05-20· [c-and-cpp, compilers-and-language-design]
links:none on file
slides:none on file

Demonstrates using C++17 fold expressions to process parameter packs and shows a comma-operator foreach trick that’s terse but cannot capture heterogeneous return types. Cites a Stack Overflow one‑liner that accumulates results via a callable used as a binary operator, then points out failure when intermediate types differ (for example concatenating multiple std::tuple types). Presents a hand‑rolled alternative that compiles and passes quick tests — implemented and working in the provided slides and repo.

AI-written summary · about

  1. 0:00Start
  2. 0:28Generalized fold expressions
  3. 1:17With comma operator
  4. 1:52Generalized fold one-liner
  5. 2:55Works with constexpr too
  6. 3:27Possible solution
~/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.