Modern C++ Design: Generic Programming and Design Patterns Applied
by Andrei Alexandrescu
Beyond the C++ Standard Library: An Introduction to Boost
by Björn Karlsson
C++ Templates: The Complete Guide
by David Vandevoorde; Nicolai M. Josuttis
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices
by Herb Sutter; Andrei Alexandrescu
Elements of Programming
by Alexander Stepanov; Paul McJones
Sams Teach Yourself C++ in One Hour a Day, Sixth Edition
by Jesse Liberty; Siddhartha Rao; Bradley Jones
Modern C++ Design: Generic Programming and Design Patterns Applied
by Andrei Alexandrescu
C++ Primer, Fourth Edition
by Stanley B. Lippman; Josée Lajoie; Barbara E. Moo
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.
Average Amazon.com® Rating: ![]()
![]()
![]()
![]()
Based on 11 Ratings
Very good book - 2008-07-06
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
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.
In depth, but not intuitive - 2008-05-20
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
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?
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.
Unique material - 2008-11-27
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
Abrahams and Gurtovoy address a distinctive and little-known set of C++ features: behaviors of the template mechanism that go far beyond swapping "double" for "float." In fact, Lisp-like recursion, arithmetic, and list-processing features, all executed at compile time, give the C++ typing subsystem all the power of a Turing machine - but without such nice debugging features.
The authors base most of their discussion on the open-source Boost Meta-programming library (MPL), perhaps the most widely known and highly developed usage of this capability. Most of the discussion patiently describes this exotic set of capabilities, giving the reader a clear idea of what the library does and some idea of how the library does it. I came away a bit uncertain about the authors' purpose, though. I didn't see enough detail in describing the primitive C++ mechanisms for a reader to go off and use those primitives in new ways - this largely discusses the MPL library elements as black boxes, without a lot of detail about how they work. But, if the intended reader was meant to incorporate an existing library (like MPL) into an application, I didn't see enough in the way of practical examples or motivation. It's nice that API elements exist for handling lists like - but why? In what context do such lists arise? What useful work does this tool perform? Or is it just an idea book for an obfuscated C contestant?
Unless you've mastered the user-unfriendly documentation for Boost MPL or other libraries mentioned here, this really is the only book on the topic. I wish it covered everyday basics a bit better, for example checking that some class in a template parameter is derived from some other class. I look forward to the next reference on the topic, one that goes over internals of the library more thoroughly, or one that gives more examples of practical applications.
-- wiredweird
Four stars - but that might have been different if there were another book on the topic to compare it to.
It's about Metaprogramming - 2008-10-21
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
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.
Good for gurus, too much for anyone else - 2008-12-05
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
This is basically thorough documentation for the Boost MPL. Not for the faint of heart (when it comes to C++ templates), and probably not of too much use except to C++ gurus-in-training and to library writers.
Some information on this page was provided using data from Amazon.com®. View at Amazon >