C++ Templates

The Complete Guide

by David Vandevoorde and Nicolai M. Josuttis
read July-Aug 2003
reviewed Jul 21 2003

First impressions on 21 July 2003

Encyclopaedic but readable. Part I is a tutorial overview of templates. The remainder of the book covers advanced usage, idioms and cutting edge techniques, and serves as a detailed reference as well. I bought the book because I stalled out on page 12 of Andrei Alexandrescu’s Modern C++ Design for inadequate understanding of templates. (dead link to moderncppdesign.com)

I like the book. So I get to complain a little: I’m in the middle of Part I now. The level is uneven: a properly (but painfully) elementary first chapter is followed by a fairly heavy section on template function overloading which invites you to digest the gory details in an appendix. Maybe when I return to the book as a reference guide I’ll be glad of that. Code examples get repeated verbatim, sometimes on the same page, to illustrate an additional point. Pads the book out a bit, and makes me scratch my head looking for differences that aren’t there. On the other hand, keeps me from having to flip back a page.

Physically, the books is attractive, with a clear and readable font and layout. Solidly in the Stroustrupesque “academic” tradition: straight text, no silly icons or sidebars.

c++ computer programming c++ templates