Pruning Error Messages From Your C++ Template Code
summary
Library SQLpp11 generates 18 KB/100-line GCC and 38 KB/~300-line Clang error dumps for a tiny misuse; applying concrete techniques cuts those hundreds of lines to about three. Techniques include portable static_assert types that defer and surface specific checks, tag dispatch to stop compilers running past failures, and a comma-operator pack trick to avoid recursive variadic instantiations. Concepts-lite helps but is currently buggy, enable_if and return-type asserts can worsen noise, and the chosen fixes work at the cost of extra template complexity and some compile-time overhead.
AI-written summary · about
chapters (16)
- 0:00Introduction to speaker
- 1:33The SQL Plus+ library
- 4:52Compiler error issues
- 6:43Minimizing template use
- 9:49Avoiding recursion
- 14:08Compile-time checks
- 16:47Static assert techniques
- 23:46Using enable_if
- 25:15Concepts light experiment
- 28:32Combining techniques
- 31:48Static assert and tag dispatch
- 33:43SFINAE and static assert
- 35:18Handling unknown checks
- 40:54Portable static assertions
- 44:11Library safety wrappers
- 46:15Summary and Q&A
related talks
57mIntroduction to C++ Template Metaprogramming
03mMaking sense of terrible template errors with 'camomilla'
01h 01mRethinking the Way We Do Templates in C++
05mHighlighting C++ with C++ is… Hard
01h 30mRethinking the Way We Do Templates in C++
58mHow to test static_assert?
01h 39m“Thoughts on a more powerful and simpler C++ (5 of N)”
58mC++17 in Practice - The good and the ugly
