Templates are where C++ interviews stop being about syntax and start being about the compiler's model of your code. This topic builds that model one mechanism at a time, then asks you to use it the way an interviewer will: predict what the compiler deduces, repair code that does not compile, and implement the small library components that keep coming up.
The approach: a mechanism ladder with set pieces. Each deck isolates one mechanism — deduction, dependent names, packs, traits, SFINAE, concepts — in cards small enough to answer in two or three minutes, which is what makes them stick under spaced repetition. Each deck then ends in one or two starred set pieces: the interview-sized question that combines everything the deck just taught (a deduction guide, a dependent-name repair, tuple_apply, function_traits, an is_iterable detector, a subsumption-ordered overload set, a type-erased callable).
Eight decks, easy to hard.
T becomes for value, reference, and forwarding-reference parameters; array-extent deduction; how templates compete with non-template overloads; partial specialization, why function templates cannot have it, and deduction guides.typename, .template, and this->; two-phase lookup; if constexpr discarding a branch; why a template body's error waits for instantiation.sizeof..., recursive peeling and its fold-expression replacement, empty-pack identities, template-template parameters, and std::index_sequence.is_same, conditional_t, remove_cvref_t, and inline variable templates by hand; decltype(x) versus decltype((x)); std::declval; peeling a function type apart with partial specialization.std::enable_if_t in both its usable forms, std::void_t detection idioms, and a fallback overload that always stays viable. This deck is the legacy-reading skill: you will meet this code, even though you will write the next deck's version.enable_if overload as a constrained one; and letting subsumption pick the most constrained candidate.if constexpr, constraining a CRTP mixin, hidden-friend operators and ADL, the overloaded visitor helper, controlling code bloat with explicit instantiation, an owning type-erased callable, and the judgment call between templates, concepts, virtual dispatch, and type erasure.How the cards work. Most cards are exercises: you fill in a small region of a file that already contains the scaffolding and a doctest suite, and run it in the browser. Compile-time properties are checked with static_assert plus a matching runtime CHECK, so a passing run proves the property held during compilation. Where the point is a translation-unit rule or a compiler behaviour you cannot observe inside one file, the card asks a multiple-choice question with a teaching rationale on every option.
Exercises target GCC 14.3 in C++23 mode (-std=gnu++23) with doctest. Reference solutions are one click away, and hints move from a nudge to the exact construct.