1484980710 Modern C++ Design: Generic Programming and Design Patterns Applied - General Programming - Books - Books - GameDev.net

Jump to content

  • Log In with Google      Sign In   
  • Create Account

Game Development Books

Top Selling Books

  • You cannot edit this book

Modern C++ Design: Generic Programming and Design Patterns Applied ****-

Modern C++ Design: Generic Programming and Design Patterns Applied By Andrei Alexandrescu
Published February 2001
List Price: $64.99, Your Amazon.com Price: $59.23

Amazon.com Sales Rank: 99,566
Availability: 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 credit card will not be charged until we ship the item.

Generic Programming and Design Patterns Applied

Similar Books:

Buy it now:



  • You cannot edit this book


'State-of-the-art' generic programming in C++ (2000-2002).
The work-horse of the book is the TypeList construct with enables one to maintain and manipulate list of type-information at compile time.

With TypeList in hand, it is possible to automate the implementation of design patterns. Several GoF design patterns are implemented in template code are explained in the book.

The (template) policy based smart-pointer implementation may become part of the C++0x standard.

The SmallObjectAllocator mitigates object construction and destruction (takes about 400 CPU ticks to do both) for small objects, making typically high-overhead designs practical for performance sensitive code.

Generalized Functors make functions & methods (and other functors) first class citizens in C++, with full value semantics. An obvious application is implementing Undo/Redo, and an example is provided in the book.

At the time of publishing, very few compilers supported enough C++ to compile Loki (the name of the Modern C++ library). This has recently changed (Aug-2002), as Loki has been ported to gcc 2.95, Microsoft Visual C++ 7, Borland C++ Builder 6, & CodeWarrior 6.
This book is an excellent demonstration of how to apply advanced template metaprogramming to simple problems to arrive at a much more elegant solution.
I was surprised to see that the book solved quite a few problems I've thought about extensively in the past. Even for those problems of mine it didn't solve directly, it still shed quite a light on them and helped me discover elegant solutions that don't look like they've been hacked together by accident.