Specialization

Let's learn about template specialization in this lesson.

Specialization

Template specialization addresses the need to have different code for different template argument types. Templates define the behavior of families of classes and functions.

  • Often it is necessary that special types, non-types, or templates as arguments are treated as special.
  • You can fully specialize templates; class templates can even be partially specialized.
  • The methods and attributes of specialization don’t have to be identical.
  • General or Primary templates can coexist with partially or fully specialized templates.
...
Access this course and 1400+ top-rated courses and projects.