~/talk

“Implementing `static` control flow in C++14"

Talkat CppCon 2016 · 2016-09-18..09-23· [c-and-cpp]
slides:none on file

Shows a working C++14 implementation of compile-time branching and looping that mimics C++17 if constexpr and adds a richer static_for with index, accumulator, break/continue and runtime side effects. Uses generic lambdas, variable templates and integral_constant wrappers, plus the for-args initializer-list trick and recursive lambdas to iterate. Demonstrates examples (consume, compile-time fold, static_for summation), compiles cleanly on GCC/Clang and emits zero-cost runtime assembly at -O, with measurable compile-time cost for recursion.

AI-written summary · about

  1. 0:00Introduction
  2. 0:42Static control flow overview
  3. 7:06C++14 static if implementation
  4. 14:57Code examples and demos
  5. 23:00Compile-time iteration with for ARS
  6. 36:25Static 4 compile-time loop
  7. 54:48Implementation details
  8. 1:00:46Conclusion and Q&A
~/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.