~/talk

How to test static_assert?

Talkat Meeting C++ 2016 · 2016-11-18..11-19· [rust]
links:none on file
slides:none on file

Problem: reliably verify compile time static_assert behavior across compilers. Solution builds on SQL++11/17: wrap static_assert into types and split condition from an unconditional failure type that explodes when touched, then test return type via decltype/is_same instead of forcing compilation failures. Uses Clang/GCC/MSVC diagnostic tools for occasional end-to-end checks but notes they are brittle and compiler/version dependent; C++17 if constexpr simplifies and consolidates the approach. Implementation exists in the SQL++ codebase and mostly works though a Clang constexpr instantiation quirk breaks some cases.

AI-written summary · about

  1. 0:00Start
  2. 5:10Basic Approaches
  3. 11:01Multiple Test Cases in One File
  4. 14:10Return Types
  5. 39:09Summary
  6. 39:24Clean Up
~/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.