~/talk

Pruning Error Messages From C++ Template Code

Talkat Meeting C++ 2014 · 2014-12-05..12-06· [developer-experience]
links:none on file
slides:none on file

A concrete recipe reduces 19 KB / 92 lines of GCC template noise down to two short messages for the SQL Plus+ embedded‑SQL library: hide templates behind inheritance, avoid recursive variadic meta‑recursions, prefer static_assert at API border, use static dispatch with run_check types to stop the compiler from droning on, and prefer checking rather than enable_if because GCC/Clang differ. Concepts lite looks promising but immature; the implemented approach compiles far faster and produces precise user‑facing errors.

AI-written summary · about

  1. 0:00Reducing C++ template errors
  2. 1:09Template errors problems and expectations
  3. 3:38Clear error messages in templates
  4. 5:25Compiler differences in errors
  5. 6:53Avoid unnecessary templates
  6. 7:57Hide templates behind APIs
  7. 10:05Avoid recursion in templates
  8. 12:13Static assert for clear errors
  9. 14:25Static assert in functions
  10. 19:03Move static assert closer
  11. 20:48Limitations of enable_if
  12. 22:56Concepts Light for better errors
  13. 24:42Techniques summary
  14. 25:24Personal static assert strategy
  15. 31:29Static dispatch to prevent errors
  16. 34:02Collecting types for errors
  17. 37:17Final error message improvements
  18. 39:49Reducing errors to one message
  19. 41:38Key takeaways for developers
  20. 44:10Q&A: Deleted methods
  21. 45:33Q&A: Empty templates
  22. 46:42Q&A: Compiler error standards
  23. 48:07Q&A: Testing error messages
  24. 49:32Closing remarks
~/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.