O'Reilly logo

The C++ Programming Language, Fourth Edition by Bjarne Stroustrup

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

25. Specialization

It ain’t what you don’t know that gets you into trouble.

It’s what you know for sure that just ain’t so.

– Mark Twain

Introduction

Template Parameters and Arguments

Types as Arguments; Values as Arguments; Operations as Arguments; Templates as Arguments; Default Template Arguments

Specialization

Interface Specialization; The Primary Template; Order of Specialization; Function Template Specialization

Advice

25.1. Introduction

Over the last two decades, templates have developed from a relatively simple idea to the backbone of most advanced C++ programming. In particular, templates are key to techniques for

• improving type safety (e.g., by eliminating the use of casts; §12.5);

• raising the general level of abstraction ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required