~/talk

Testing Everything in Constexpr

Talkat C++Now 2026 · 2026-05-04..05-08· [testing, c-and-cpp]
slides:none on file

Claims that code claimed to be constexpr must be tested at compile time and shows a C++20 testing toolchain: a parser library token plus a standalone test library ketchup that avoids raw static_assert storms by deferring diagnostics to runtime, provides Google‑Test–style assert/expect variants that check both compile‑time and runtime, and uses stood::source_location plus stateful metaprogramming to preserve per‑function traceability. The library compiles and runs tests cross‑platform in practice, but remains a work in progress.

AI-written summary · about

  1. 0:00Compile-time unit testing intro
  2. 1:02History of C++ compile-time
  3. 9:48Forms of compile-time testing
  4. 20:32In-source vs out-of-source
  5. 35:55Testing in token parser library
  6. 53:45Introducing ketchup library
  7. 1:08:17Dependent compile-time checks
  8. 1:19:50Future directions
~/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.