正常
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)
- Template Introduction
- Function Templates
- Class Templates
- Template Specialization and Partial Specialization
- Non-Type Template Parameters
- Template Parameter Dependence and Name Lookup
- Template Friends and Barton-Nackman
- Template Aliases and Using Declarations
- Templates and Inheritance (CRTP)
- Comprehensive Project: fixed_vector<T, N>