Chapter 7. Why Not Specialize Function Templates?

Difficulty: 8

Although the title of this Item is a question, it could also be made into a statement: This Item is about when and why not to specialize templates.

Solution

The Important Difference: Overloading vs. Specialization

It's important to make sure we have the terms down pat, so here's a quick review.

  1. What two major kinds of templates are there in C++, and how can ...

Get Exceptional C++ Style 40 New Engineering Puzzles, Programming Problems, and Solutions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.