Modern C++ Design: Generic Programming and Design Pattern... and over 2 million other books are available for Amazon Kindle . Learn more
FREE Delivery in the UK.
Only 5 left in stock (more on the way).
Dispatched from and sold by Amazon.
Gift-wrap available.
Quantity:1
Modern C++ Design: Generi... has been added to your Basket
Condition: Used: Like New
Comment: Used Good condition book may have signs of cover wear and/or marks on corners and page edges. Inside pages may have highlighting, writing and underlining. All purchases eligible for Amazon customer service and a 30-day return policy.
Trade in your item
Get a £9.62
Gift Card.
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 2 images

Modern C++ Design: Generic Programming and Design Patterns Applied: Applied Generic and Design Patterns (C++ in Depth) Paperback – 13 Feb 2001


See all 8 formats and editions Hide other formats and editions
Amazon Price New from Used from
Kindle Edition
"Please retry"
Paperback
"Please retry"
£40.99
£22.68 £20.00
£40.99 FREE Delivery in the UK. Only 5 left in stock (more on the way). Dispatched from and sold by Amazon. Gift-wrap available.

Special Offers and Product Promotions

  • When you trade in £15 or more you’ll receive an additional £5 Amazon.co.uk Gift Card for the next time you spend £10 or more.

Frequently Bought Together

Modern C++ Design: Generic Programming and Design Patterns Applied: Applied Generic and Design Patterns (C++ in Depth) + Effective C++: 55 Specific Ways to Improve Your Programs and Designs (Professional Computing) + The C++ Programming Language
Price For All Three: £100.91

Buy the selected items together


Trade In this Item for up to £9.62
Trade in Modern C++ Design: Generic Programming and Design Patterns Applied: Applied Generic and Design Patterns (C++ in Depth) for an Amazon Gift Card of up to £9.62, which you can then spend on millions of items across the site. Trade-in values may vary (terms apply). Learn more

Product details

  • Paperback: 352 pages
  • Publisher: Addison Wesley; 1 edition (13 Feb. 2001)
  • Language: English
  • ISBN-10: 0201704315
  • ISBN-13: 978-0201704310
  • Product Dimensions: 18.7 x 1.9 x 23.2 cm
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (9 customer reviews)
  • Amazon Bestsellers Rank: 232,608 in Books (See Top 100 in Books)
  • See Complete Table of Contents

More About the Author

Discover books, learn about writers, and more.

Product Description

From the Back Cover

Modern C++ Designis an important book. Fundamentally, it demonstrates ‘generic patterns’ or ‘pattern templates’ as a powerful new way of creating extensible designs in C++–a new way to combine templates and patterns that you may never have dreamt was possible, but is. If your work involves C++ design and coding, you should read this book. Highly recommended.
–Herb Sutter

What’s left to say about C++ that hasn’t already been said? Plenty, it turns out.
–From the Foreword by John Vlissides

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, http://www.awl.com/cseng/titles/0-201-70431-5, 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 www.codesaw.com. CodeSaw is a free online learning tool that allows you to experiment with live code from your book right in your browser.



0201704315B11102003

About the Author

Andrei Alexandrescu is the author of the award-winning book Modern C++ Design (Addison-Wesley, 2001) and is a columnist for C/C++ Users Journal.




Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index
Search inside this book:

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

4.4 out of 5 stars
Share your thoughts with other customers

Most Helpful Customer Reviews

19 of 19 people found the following review helpful By Thing with a hook on 2 Mar. 2007
Format: Paperback
This is 300 pages of the hardest of hardcore template metaprogramming you could currently hope to read. As a result, there is a risk you may find more to admire and speculate upon from afar, than to actually use. Various factors will decide this, from the robustness of your compiler, your comfort with far-out template wackiness, and your confidence in debugging and maintaining the result.

One thing is not in doubt: C++ metaprogramming is devilishly clever. That's part of its appeal. It's also capable of producing flexible, efficient families of software. Modern C++ Design pushes the boundaries of TMP further than the more specialised matrix domain detailed in Czarnecki and Eisenecker's Generative Programming (a recommended prologue to this book). Here, the aim is implementing entire design patterns. This is a fairly bold claim, as the received wisdom on design patterns is that there isn't a canonical form that can be presented in code.

And that still holds true. Instead, the code in Modern C++ Design is metacode built on two big ideas: policies and typelists, which are described in the opening chapters, along with some other useful tools. The hard intellectual work is done here, especially the typelist chapter, although previous exposure to the likes of Generative Programming definitely softens the blow. Policies are what Java programmers know as Dependency Injection, except one level of abstraction up (the relationship between classes and objects in DI is done with templates and classes with policies), and with the template instantiation and specialisation rules of C++ providing an extra layer of flexibility. Typelists are exactly as the name suggests - a list of types, but they exist only at compile time.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
69 of 73 people found the following review helpful By A Customer on 27 Mar. 2001
Format: Paperback
Every couple of years there appears a classic, Stroustrupp, Advanced C++, the GOF patterns book, Eff C++ and More Eff C++, now there is this. Everyone has an opinion, and mine is this. Modern C++ Design is top of the list. It deserves to be no more than an arms length away from every serious programmer, designer, academic or teacher. Inside this you will find breath-taking displays of sheer wizardry, creativity, and inventiveness from a master craftsman. If I were to single out my favourite features of this book it would have to be the following, and don't be put off if you don't know what they are, just accept it that they are astonishing programming techniques and design tools. Policy classes. An astonishingly simple but elegant programming technique that enforces design time decisions completely. Typelists and a family of algorithms for manipulating them. Simply astonishingly, jaw-droppingly elegant structures for manipulating lists of types. The best description, and certainly the best implementation, of some of the GOF patterns I have ever seen. Have you read the consequences of a pattern and just singled in on one item which is exactly what you need. Then in another project, you can't use that implementation because you need to implement a different feature. E.g., single threaded in one project and multi-threaded in another or creating objects on the stack and then needing to use the heap. These implementations show you how to do all this, and more, in one suite of code. The Abstract Factory and Multi Method chapters are quite simply astonishing feats of engineering. It contains the best description of smart pointers I have ever seen. Ever wondered why std::string does not convert to a const char* but other string classes do?. Ever tried to write no-intrusive pre and post conditions.Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
11 of 12 people found the following review helpful By A Customer on 4 April 2002
Format: Paperback
This is an excellent book, well written well structured and very interesting. The Library and the techniques described may not be of every day use but on those occasions when they are of use they would be very handy to have. The one problem is that these are advanced techniques and a lot of compilers (specifically Visual C++ 6/7) can't currently build the code. It is possible to rewrite the library to get around the compiler issues but it's a lot of extra work. That aside, compilers will be coming online that can use it soon so it is worth reading now in order to be able to start using it as soon as possible.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
1 of 1 people found the following review helpful By Fabrizio Angius on 13 Mar. 2008
Format: Paperback
An excellent book and a IMHO a MUST if you want to get a professional C++ (and not only) developer.
It covers lots of practical topics, unveiling advanced techniques and "hidden" features of the C++ programming language.

I would suggest to get a good knowledge of C++ first (e.g. read Stroustrup's TCPL bible) or you won't grasp most of the topics.

I must admit that reading the book I was all "Wow! You can do that?!?".
Sure, not a big deal if you are already a pro, but you won't be reading this review, I suppose.

I would suggest this book even if you intend to move to another language as it really helped me thinking about things and understanding many language features and hardcore techniques.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
Format: Paperback Verified Purchase
This book is about template metaprogramming. Even if you can't see a use for that technique, merely reading this book will tax your brain to the maximum and expand your programming horizons.

I first read this book about a decade ago as some light (ahem) holiday reading and I'll be the first to confess that I didn't 'get it' first time. There were many 'how the ...?' and 'what the ...?' moments. Now a decade and a lot more experience later I've re-read it and finally it makes sense.

Andrei taxes the language and the compilers to the maximum in ways that you may not want to do in production code as the number of people that will be able to maintain it will be small, but as an intellectual exercise this book should be up there with Knuth's classics.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again


Feedback