~/talk

Harnessing constexpr: a path to safer C++

Talkat Meeting C++ 2025 · 2025-11-06..11-08· [security]
links:none on file
slides:none on file

Claims that using constexpr from C++11 through C++26 reduces UB and memory bugs, backed by examples where compilers reject integer overflow and dangling string_view, and by sanitizers (ASan/UBSan) and static analysis comparisons; cites Microsoft and Google figures (~70% and ~67% of vulnerabilities tied to memory safety). Demonstrations build compile‑time tests with Catch2/static_assert, fmt and a consteval two‑step trick to produce diagnostics; constexpr detection works when the failing path is exercised but requires good test coverage, exposes missing constexpr in libraries, cannot replace runtime sanitizers for IO or threads.

AI-written summary · about

  1. 0:00Introduction and agenda
  2. 1:21Is C++ a safe language?
  3. 4:55Common pitfalls in C++
  4. 13:35Traditional solutions
  5. 20:45Evolution of constexpr
  6. 35:15Constexpr in C++26
  7. 40:41Constexpr case studies
  8. 48:18Testing constexpr code
~/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.