~/talk

Rethinking the Way We Do Templates in C++ even more

Talkat C++ on Sea 2020 · 2020-07-15..07-17· [c-and-cpp]
slides:none on file

Implementation of a Physical Units Library uses downcast via hidden friend ADL+CRTP to replace long aliased template instantiations so debugging and compile-time errors show friendly unit names instead of giant types; adopting class-types-as-NTTPs and concepts moves ratio arithmetic from deep template recursion to value-like operations. Metabench (gcc/clang comparisons) shows variable-template specializations and NTTP-based ratios compile several× faster, with some compile steps falling from tens of seconds to a few, and the approach works in practice.

AI-written summary · about

  1. 0:00Start
  2. 3:34Physical Units library in a nutshell
  3. 5:36Toy example
  4. 11:00User's experience: Compilation: NHolthaus Units
  5. 13:26A need to modernize our toolbox
  6. 14:45User's experience: Debugging: Boost.Units
  7. 16:44Type aliases are great for developers but not for end users
  8. 20:32Type substitution problem
  9. 21:52Downcasting facility (Version 1.0)
  10. 23:44Downcasting facility (Version 2.0): Overview
  11. 26:01Downcasting facility: Design
  12. 29:13User experience: Debugging
  13. 36:27Non-type template parameters (NTTP) (C++20)
  14. 37:30NTTP:Template argument equivalent values (C++20)
  15. 43:06Class Types in Non-Type Template Parameters
  16. 43:58How do you feel about such an interface?
  17. 46:39Concept categories
  18. 49:33New concept category?
  19. 51:20Concepts perception issue
  20. 55:02Concepts example
  21. 57:48What is the difference?
  22. 59:44Benefits of using C++ Concepts
~/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.