~/talk

An example of applying variadic templates to C code

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

Shows replacing repetitive SQLite bind calls for inserting rows into Student and Teacher tables (Teacher example has three columns) by using variadic templates to collect arguments and either a recursive pack expansion or a single-line parameter pack trick. Demonstrates migrating the recursive binds to a one-line expansion that returns a throwaway initializer and then to a C++17 fold expression version with no byproduct. Code compiles and the example works with the C-style SQLite API.

AI-written summary · about

  1. 0:00Start
  2. 1:32C style solution
  3. 2:18bind overload
  4. 2:40BindAll function
  5. 3:42parameter pack expansion
~/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.