~/talk

X-Macro: How to avoid repetition

Talkat CppCon 2017 · 2017-09-24..09-29· [rust]
links:none on file
slides:none on file

Shows an implemented pattern that keeps one single source list of enum entries and uses the preprocessor to generate both the enum and string conversion so you never forget to update a switch case The demo builds an X‑macro list, redefines X to emit enum values then redefines X again to emit switch case returns Adding a new state updates both places automatically and the approach plainly works for the presented examples

AI-written summary · about

  1. 0:00Intro
  2. 0:25Motivation
  3. 1:12The problem
  4. 1:44The solution
  5. 2:10The XMacro
  6. 2:49Reusing XMacro
~/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.