Product Details
C++ Templates: The Complete Guide

C++ Templates: The Complete Guide
By David Vandevoorde, Nicolai M. Josuttis

List Price: £43.99
Price: £30.79 & eligible for FREE Super Saver Delivery on orders over £5. Details

Availability: Usually dispatched within 24 hours
Dispatched from and sold by Amazon.co.uk

31 new or used available from £19.93

Average customer review:

Product Description

This book will be the next C++ classic. Although templates have been part of C++ for well over a decade, they still lead to misunderstanding, misuse, and controversy. At the same time, they are increasingly found to be powerful instruments for the development of cleaner, faster, and smarter software. This has made templates one of the hottest topics in the C++ community. This book will be both a complete reference as well as a tutorial. It will emphasize the practical use of templates, and will include real-world examples. Every working C++ programmer will need a copy of this book for his or her library.


Product Details

  • Amazon Sales Rank: #163979 in Books
  • Published on: 2002-11-20
  • Original language: English
  • Number of items: 1
  • Binding: Hardcover
  • 552 pages

Editorial Reviews

From the Back Cover

Templates are among the most powerful features of C++, but they are too often neglected, misunderstood, and misused. C++ Templates: The Complete Guide provides software architects and engineers with a clear understanding of why, when, and how to use templates to build and maintain cleaner, faster, and smarter software more efficiently.

C++ Templates begins with an insightful tutorial on basic concepts and language features. The remainder of the book serves as a comprehensive reference, focusing first on language details, then on a wide range of coding techniques, and finally on advanced applications for templates. Examples used throughout the book illustrate abstract concepts and demonstrate best practices.

Readers learn

  • The exact behaviors of templates
  • How to avoid the pitfalls associated with templates
  • Idioms and techniques, from the basic to the previously undocumented
  • How to reuse source code without threatening performance or safety
  • How to increase the efficiency of C++ programs
  • How to produce more flexible and maintainable software

This practical guide shows programmers how to exploit the full power of the template features in C++.

The companion Web site at http://www.josuttis.com/tmplbook/ contains sample code and additional updates.



0201734842B09172002

About the Author

David Vandevoorde is an engineer at the Edison Design Group. He is an active member of the ANSI C++ Standards Committee, and a cofounder of the newsgroup comp.lang.c++.moderated. A graduate of the Brussels Free University and the Rensselaer Polytechnic Institute, his interests include algorithm development, programming languages, and teaching. See www.vandevoorde.com.

Nicolai M. Josuttis is an independent technical consultant who designs object-oriented software for the telecommunications, traffic, finance, and manufacturing industries. He is an active member of the C++ Standards Committee Library Working Group. Nicolai has written several books on object-oriented programming and C++. See www.josuttis.com.



0201734842AB09172002


Customer Reviews

One of the best books on C++ templates5
C++ templates form a much more complex piece of technology than their humble start as a tidier macro mechanism. Just about any C++ programmer these days touches them in some form, but there is a vast difference between using template libraries and writing them. The texts that describe templates seem to be either very simple ("this is how to use std::vector<>") or very detailed (such as Alexandrescu's excellent book) - Vandevoorde & Josuttis span just about all of the template world in their book, starting from the basic usage through to meta-programming techniques used in libraries such as Blitz++ and Boost.

As well as the theory of templates, and the practice of code-writing, there are valuable snippets such as detangling typical compiler error messages.

An excellent book for any intermediate to advanced C++ user, this book is more formal than Alexandrescu, but more readable than Czarnecki & Eisenecker: if you can get only one of those three, pick this one.

Informative and comprehensive5
This book provides a gentle introduction to templates from a number of angles:

- Production of template based code
- Use of templates as a design tool
- More complex (ab)uses of the template system

As someone who has used templates extensively in the past, I still found this book to be a useful read. It covers a range of topics that I hadn't thought about before in detail, pointing out the caveats of different techniques and motivating their use.

The book doesn't go in to compiler specific issues in any depth and avoids the well covered topic of the STL. Instead it provides a small number of more complex examples of template usage such as functors, tuples and expression templates. The book contains a large number of code examples, which makes understanding the content relatively straightforward. The writing style is informative and informal without trying to be the readers friend; as seems to be the aim of some computer book authors.

Overall it was pleasant and useful read.

Good mix of theory and practice5
Truly a very good book.

Part I covers the basics. In particular, I found chapter 6 useful. I've not seen any other source of information on the machanisms of template instantiation that most of the C++ compilers available use.

Part II covers more advanced template usage, like template template parameters. Again, chapter 10 on Instantiation is very much grounded in practical use.

Part III moves on to idioms and the usage of templates. I found chapter 18 of particular use (for numerical computing with matrices, leading to Blitz).

The final part of the books covers techniques like type traits, smart pointers, tuples and functors (in the same vein as some of the boost libraries).