Skip to content

Template Basics (C++11-14)

Status: To be written

C++ templates are the core mechanism of generic programming. This section builds a complete foundational knowledge system of templates from scratch, covering function templates, class templates, specialization and partial specialization, non-type parameters, name lookup, friend injection, aliases, inheritance, and CRTP.

Chapter Contents (To be written)

  1. Template Introduction
  2. Function Templates
  3. Class Templates
  4. Template Specialization and Partial Specialization
  5. Non-Type Template Parameters
  6. Template Parameter Dependence and Name Lookup
  7. Template Friends and Barton-Nackman
  8. Template Aliases and Using Declarations
  9. Templates and Inheritance (CRTP)
  10. Comprehensive Project: fixed_vector<T, N>

v0.7.0-9-g940ec1b · 940ec1b · 2026-07-05