Your Library
Chapter 7 · TemplatesParameterized types, operations, and compile-time mechanisms
Contents
Chapter 6Sections 7.1–7.5

Templates

Parameterized types, operations, and compile-time mechanisms

Templates let classes and functions work with types or compile-time values. This chapter builds a generic Vector<T>, introduces concepts and class template argument deduction, and explores function templates, function objects, lambdas, and supporting mechanisms such as alias templates and if constexpr.

In this chapter

  1. 6.1Lesson 7: Templates