Skip to content
Scan a barcode
Scan
Paperback C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond [With CD-ROM] Book

ISBN: 0321227255

ISBN13: 9780321227256

C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond [With CD-ROM]

Select Format

Select Condition ThriftBooks Help Icon

Recommended

Format: Paperback

Condition: Like New

$15.89
Save $44.10!
List Price $59.99
Almost Gone, Only 1 Left!
Save to List

Book Overview

Abrahams and Gurtovoy have written something close to a classic... marvelous fun to read...
Read the complete book review by Jack J. Woehr, Dr. Dobbs Journal, June 03, 2005

"If you're like me, you're excited by what people do with template metaprogramming (TMP) but are frustrated at the lack of clear guidance and powerful tools. Well, this is the book we've been waiting for. With help from the excellent Boost Metaprogramming Library, David and Aleksey take TMP from the laboratory to the workplace with readable prose and practical examples, showing that "compile-time STL" is as able as its runtime counterpart. Serving as a tutorial as well as a handbook for experts, this is the book on C++ template metaprogramming."
--Chuck Allison, Editor, The C++ Source C++ Template Metaprogramming sheds light on the most powerful idioms of today's C++, at long last delivering practical metaprogramming tools and techniques into the hands of the everyday programmer. A metaprogram is a program that generates or manipulates program code. Ever since generic programming was introduced to C++, programmers have discovered myriad "template tricks" for manipulating programs as they are compiled, effectively eliminating the barrier between program and metaprogram. While excitement among C++ experts about these capabilities has reached the community at large, their practical application remains out of reach for most programmers. This book explains what metaprogramming is and how it is best used. It provides the foundation you'll need to use the template metaprogramming effectively in your own work. This book is aimed at any programmer who is comfortable with idioms of the Standard Template Library (STL). C++ power-users will gain a new insight into their existing work and a new fluency in the domain of metaprogramming. Intermediate-level programmers who have learned a few advanced template techniques will see where these tricks fit in the big picture and will gain the conceptual foundation to use them with discipline. Programmers who have caught the scent of metaprogramming, but for whom it is still mysterious, will finally gain a clear understanding of how, when, and why it works. All readers will leave with a new tool of unprecedented power at their disposal--the Boost Metaprogramming Library. The companion CD-ROM contains all Boost C++ libraries, including the Boost Metaprogramming Library and its reference documentation, along with all of the book's sample code and extensive supplementary material.

Customer Reviews

5 ratings

It's about Metaprogramming

The operative word in the title is "Metaprogramming". If your looking for C++ template programming, your better off going elsewhere. Metaprogramming is hard, uses an arcane syntax, and the compilers give you very little help. It's not for the faint of heart. BUT is this is where you want to go, then this is the book to have. The authors take a very advanced complex topic and break it down to comprehensible chunks. They introduce you to the best metaprogramming library (Boost::MPL) and give you a comprehensive context to make useful applications.

Very good book

I am not a meta programming expert, however I learned a lot from this great book. I suggest first to read Alexandrescu's Modern C++ first and a learn basic techniques then get this book to be able understand the mpl better.

Hope to see more books written by David Abrahams

C++ Template Metaprogramming is a very valuable book. For me, already chapter 2 was worth the money of the complete book. It showed me how to think in Templates and Metafunctions. That helped me to understand a lot of the other template technics. As a user of boost.python I always wondered what's possible with templates. My personal target is to understand what's going on in that magic library. This book brought me a very big step further. I suggest reading this book before reading any of the other Template books like 'Modern C++ Design'. But probably you don't need no other book after reading this one.

Necessary book for template library writers.

This book describes the boost MPL library. Its a very useful guide to this library and it includes enough examples to walk you through how to use it. Secondly the book explains Meta-programming. This is a new concept to a lot of C++ programmers and old hat to LISP programmers. The C++ pre-compiler is constrained to integral types as constraints. But there are a host of tricks you can use within that constraint to build libraries that adapt to their calling structure. Thus generating code that is as efficient as hand written. Of course with your compiler, your milage may vary. The other great thing about using this library, MPL, is that where you would write repeticious template code for every parameter in a template'd library like Tuples, you can automate with it with MPL. Meta programming is a pretty new concept within the C++ community and this book will give us a common language to talk about it. There are other resources on the net, but this book pulls them together. Highly recommended for expert C++ programmers, C++ Library writers and intermediate programmers study'ing to become experts. If you finished Andrei's book, "Modern C++ Design", this is a great next book to buy and own.

An interesting book...

This is a really interesting book. The template metaprogramming technical topics covered are extremely advanced, and right at the leading edge of C++ library development, yet the step-by-step presentation makes the material understandable even to intermediate programmers. Since the book draws its examples from code that works with the Boost libraries (supplied on a CD), readers can try the examples and play around with them to see how they work. Some of the libraries discussed (Boost Type Traits, Boost Bind) are well along to becoming part of the C++ standard via a library technical report, so they will eventually become available to every C++ programmer. The bulk of the book is devoted to the Boost Metaprogramming Library, which packages up a lot of advanced techniques into accessible form. One issue with template metaprogramming is that compile times can get out of hand. The book includes an appendix with hints on avoiding the problem, together with test timings for a half-dozen popular compilers. I really like the timings; too many other authors make assertions about efficiency without supporting data. I would guess that this book will be of interest to intermediate and advanced C++ programmers interested in library development. And less interesting to beginning programmers, or programmers who never package up their creations into libraries.
Copyright © 2026 Thriftbooks.com Terms of Use | Privacy Policy | Do Not Sell/Share My Personal Information | Cookie Policy | Cookie Preferences | Accessibility Statement
ThriftBooks® and the ThriftBooks® logo are registered trademarks of Thrift Books Global, LLC
GoDaddy Verified and Secured