Arthur O'Dwyer on "Template Normal Programming"


Details
What is "template normal programming"? It's template metaprogramming without so much of the "meta" part! During this talk, Arthur promises not to mention SFINAE, or recursion, or standard type traits. He'll focus on the common scenarios "I think this code could benefit from templates, but I don't understand how to organize it;" "I can't get anything to compile without errors;" and "My coworker wrote some template code and I don't understand any of it."
This will be a condensed version of the two-hour presentation Arthur hopes to give at CppCon this fall.
We'll start with function templates and class templates, then explain variable templates (new in C++14) and alias templates (new in C++11). We'll touch on
- template type deduction (with some hand-waving)
- what gets instantiated when, and linkage
- explicit specialization
- some cases in which you can use "extern" to separately compile template definitions without compiler errors
- using PRETTY_FUNCTION to debug template type deduction issues
- situations in which you have to add disambiguating "template" or "typename" keywords, and why
and then cover some or all of these common template idioms:
- traits classes
- tag dispatch (turning template deduction into overload resolution)
- the CRTP
- mixins
Arthur O'Dwyer worked for many years at Green Hills Software, making the world's most optimizing C and C++ compilers. Now he works at Mixpanel in San Francisco and organizes a monthly C++ meetup. He has spoken at CppCon and at C++Now.

Sponsors
Arthur O'Dwyer on "Template Normal Programming"