~/talk

Fun With Type Erasure

Talkat ACCU 2022 · 2022-04-06..04-09· [c-and-cpp, compilers-and-language-design]
links:none on file
slides:none on file

Demonstrates a C++ dispatcher that parses JSON requests (using tao::json) and maps fields or positional arrays to real function parameters with type checks, optional parameters, auto-generated textual descriptions, and detailed error messages. Implementation uses heavy templates, C++20 non-type string literal parameters for named args, byte-array/bit_cast storage to support pointer-to-member handlers, and reinterpret_cast only when safe; it compiles, runs, and can be made constexpr so handler tables initialize at compile time.

AI-written summary · about

  1. 0:00Start
  2. 0:25What Is Stipulation
  3. 1:58Type Ratio of Functions
  4. 11:55Process Request Functions
  5. 23:25Validate Arguments Function
  6. 39:56Validation Function
  7. 44:17Use Optional Parameters
  8. 52:49Recap
  9. 54:55Type Raise Member Functions
  10. 1:04:48Default Constructor
  11. 1:09:38Aliases for Common Parameter Type
  12. 1:10:06What Can Be Done in the Future
~/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.