[C++ Generic Programming Advanced] C++ meta-template programming Two forms of template specialization: full specialization and partial specialization

Chapter 1: Template partial specialization and function overloading Templates are a powerful feature of C++, they allow us to write code that works for many types. However, sometimes we need special treatment for certain types or combinations of types, which involves template specialization. When we discuss template specialization, there are mainly two forms: full specialization […]

C++ templates: non-type template parameters, template specialization, and separate compilation of templates

Directory 1. Non-type template parameters 2. Template specialization 2.1 Specialization of function templates 2.2 Specialization of class templates 2.2.1 Full specialization 2.2.2 Partial specialization 3. Separate compilation of templates 3.1 What is separate compilation 3.2 Why templates do not support separate compilation 3.3 The template does not support the solution of separate compilation 4. Summary […]