Modern C++ Design : Generic Programming and Design Patterns Applied, Paperback Book

Modern C++ Design : Generic Programming and Design Patterns Applied Paperback

4 out of 5 (2 ratings)


In Modern C++ Design, Andrei Alexandrescu opens new vistas for C++ programmers.

Displaying extraordinary creativity and programming virtuosity, Alexandrescu offers a cutting-edge approach to design that unites design patterns, generic programming, and C++, enabling programmers to achieve expressive, flexible, and highly reusable code.

This book introduces the concept of generic components-reusable design templates that produce boilerplate code for compiler consumption-all within C++.

Generic components enable an easier and more seamless transition from design to application code, generate code that better expresses the original design intention, and support the reuse of design structures with minimal recoding.

The author describes the specific C++ techniques and features that are used in building generic components and goes on to implement industrial strength generic components for real-world applications.

Recurring issues that C++ developers face in their day-to-day activity are discussed in depth and implemented in a generic way. These include: * Policy-based design for flexibility* Partial template specialization* Typelists-powerful type manipulation structures* Patterns such as Visitor, Singleton, Command, and Factories* Multi-method engines For each generic component, the book presents the fundamental problems and design options, and finally implements a generic solution.

In addition, an accompanying Web site,, makes the code implementations available for the generic components in the book and provides a free, downloadable C++ library, called Loki, created by the author.

Loki provides out-of-the-box functionality for virtually any C++ project.

Get a value-added service! Try out all the examples from this book at

CodeSaw is a free online learning tool that allows you to experiment with live code from your book right in your browser.




Free Home Delivery

on all orders

Pick up orders

from local bookshops


Showing 1 - 2 of 2 reviews.

Review by

This book is a tour-de-force of hacking, the fine art of making complicated systems do things far exceeding the original goals of their design. It is a shame that all this ingenuity and creativity is wasted on improving C , which is an unpleasant language in which to write. It is a shame that the tools he implements and the techniques he makes available to C programmers are already available in much more expressive and more easily understood form in several other languages. I'm very impressed with the work. I just wish his efforts had been applied more productively than in re-inventing the wheel.

Review by

Collection of the authors ideas about template programming.The book left me with a considerably deeper understanding of template programming.Unfortunately, the content is structured in such a way that it can not easily be remembered. In my opinion the book "Abrahams, Gurtovoy - C++ Template Metaprogramming" does a better job at that. I find it impossible to remember long-term what the responsibility of all those traits classes was.

Also by Andrei Alexandrescu