Automotive Holiday Deals Books Holiday Gift Guide Shop Men's Cyber Monday Deals Week Learn more nav_sap_SWP_6M_fly_beacon Prime Music Sweepstakes egg_2015 All-New Amazon Fire TV Get Ready for the Winter Gifts for Her Amazon Gift Card Offer mithc mithc mithc  Amazon Echo Starting at $49.99 Kindle Voyage Cyber Monday Video Game Deals Outdoor Deals on bgg
C++ Template Metaprogramming: Concepts, Tools, and Techni... and over one million other books are available for Amazon Kindle. Learn more

Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your email address or mobile phone number.

C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond

17 customer reviews
ISBN-13: 978-0321227256
ISBN-10: 0321227255
Why is ISBN important?
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
Sell yours for a Gift Card
We'll buy it for $8.95
Learn More
Trade in now
Have one to sell? Sell on Amazon
Buy new
Temporarily out of stock.
Order now and we'll deliver when available.
Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your account will only be charged when we ship the item.
Ships from and sold by Gift-wrap available.
List Price: $59.99 Save: $19.79 (33%)
22 New from $31.00
C+++Template+Metaprogramm... has been added to your Cart
More Buying Choices
22 New from $31.00 28 Used from $15.68
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

Get Up to 80% Back Rent Textbooks
$40.20 FREE Shipping. Temporarily out of stock. Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your account will only be charged when we ship the item. Ships from and sold by Gift-wrap available.

Frequently Bought Together

  • C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond
  • +
  • Modern C++ Design: Generic Programming and Design Patterns Applied
  • +
  • C++ Templates: The Complete Guide
Total price: $141.71
Buy the selected items together

Editorial Reviews

From the Back Cover

Abrahams and Gurtovoy have written something close to a classic...marvelous fun to read.../b>
Read the complete book reviewby 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 Metaprogrammingsheds 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.

About the Author

David Abrahams is a founding member and moderator of the Boost C++ library development group. Dave has been an ANSI/ISO C++ committee member since 1996, where he is best known for contributing a theory, specification, and implementation of exception handling for the C++ standard library. His company, Boost Consulting, provides Boost-related support and development services and professional training in the art of software construction.

Aleksey Gurtovoy is a technical lead for MetaCommunications and a contributing member of the Boost C++ community. Aleksey is the original author of the Boost Metaprogramming Library. He has been working with C++ since 1993, and holds a M.S. degree in computer science from Krasnoyarsk Technical State University, Russia.


Product Details

  • Paperback: 400 pages
  • Publisher: Addison-Wesley Professional (December 20, 2004)
  • Language: English
  • ISBN-10: 0321227255
  • ISBN-13: 978-0321227256
  • Product Dimensions: 7.4 x 0.8 x 9.2 inches
  • Shipping Weight: 1.5 pounds (View shipping rates and policies)
  • Average Customer Review: 3.9 out of 5 stars  See all reviews (17 customer reviews)
  • Amazon Best Sellers Rank: #750,462 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

Most Helpful Customer Reviews

29 of 31 people found the following review helpful By HarryCat on December 30, 2004
Format: Paperback
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.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
45 of 52 people found the following review helpful By Andrew J. Lusk on April 25, 2006
Format: Paperback
This book is called "C++ Template Metaprogramming" but it should be called "Boost MPL API Reference." The first portion of this book covers the basics of template metaprogramming fairly well, but what I wanted the rest of the book to cover were both advanced techniques and real-world applications. What I got was material on how to use the Boost metaprogramming library. This book mostly covers just that library, and the various templates that it offers, but what I felt the book should have provided was not only how the more interesting parts of the MPL were implemented, but also interesting applications of the MPL where some interesting algorithm was made possible by template metaprogramming. I can look up the MPL reference docs online, thank you very much.

To summarize - this is a pretty good introduction to template metaprogramming, but seems to be suited for the unlikely position of someone who wants or needs to use this technique, but isn't academically interested in it, and so mainly needs a walkthrough of the set of standard functions available as part of the MPL.

This book is a bad choice for those interested in template metapgramming and wondering if it might help them, but want to learn more about it and its applications first.
3 Comments Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
19 of 21 people found the following review helpful By G. Powell on January 20, 2005
Format: Paperback Verified Purchase
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.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
7 of 8 people found the following review helpful By Mr Squiggle on May 20, 2008
Format: Paperback
I knew in purchasing this book that most of the time it would just be talking about the Boost MPL. That shouldn't be too bad - the Boost MPL is pretty much the fore-running meta-programming library, and there has to be lots of concepts in there to be learnt too, other than library specifics, right?
This book completely lives up to this explanation. Very quickly we are into the guts of the library, even within the beginner's tutorial section. There certainly is a LOT of concepts to be learnt and used, even if externally to the MPL.
However, I found that very quickly I was having to reread and triple-read passages to try and distil a principle from the library construct being explained. They principles are there, and are good, but I find that they are not presented distinctly enough from the library itself. This results in what feels like a lot of work to really understand the book (other than just know how to use the library).
I don't consider myself slow - I got through almost all of "Modern C++ Design" (by Alexandrescu) without having to go to a computer, but here I really felt like I NEEDED to try this stuff out on a computer and attempt the problems at the end of the chapter. This book is a lot of work - beware! - and particularly it is more than I feel should be necessary, if perhaps the authors allowed themselves more time to explain principles and concepts away from the interface of their library.
However, there is a lot of knowledge here that I don't think that you can find elsewhere, and it is a topic that is, by nature, a bit mind-bending, so I am still definitely happy with the purchase.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Recent Customer Reviews