These promotions will be applied to this item:
Some promotions may be combined; others are not eligible to be combined with other offers. For details, please see the Terms & Conditions associated with these promotions.
Your Memberships and Subscriptions
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet or computer – no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Modern C++ Design: Generic Programming and Design Patterns Applied (C++ In-Depth) (English Edition) 1st Edition, Kindle Edition
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.
- ISBN-13978-0133387612
- Edition1st
- PublisherAddison-Wesley Professional
- Publication date13 Feb. 2001
- LanguageEnglish
- File size30.2 MB
See all supported devices
Kindle E-Readers
- Kindle Voyage (7th Generation)
- Kindle Paperwhite (6th Generation)
- Kindle (8th Generation)
- Kindle Paperwhite (7th Generation)
- Kindle (11th Generation, 2024 Release)
- Kindle Oasis (9th Generation)
- Kindle Colorsoft (1st Generation)
- Kindle Scribe Colorsoft (1st Generation)
- Kindle Paperwhite (5th Generation)
- Kindle Oasis (8th Generation)
- Kindle Scribe (3rd Generation)
- Kindle Paperwhite (12th Generation)
- Kindle Paperwhite (10th Generation)
- Kindle (7th Generation)
- Kindle Scribe (2024 Release)
- Kindle Scribe (1st Generation, 2022 Release)
- Kindle Touch (4th Generation)
- Kindle Oasis (10th Generation)
- Kindle (10th Generation)
Kindle Fire Tablets
- Fire HD 8 (8th Generation)
- Fire HD 8 (12th Generation)
- Fire HD 8 (12th Generation)
- Fire HD 10 Plus
- Fire HD 8 (12th Generation)
- Fire HD 10 (9th Generation)
- Fire 7 (9th Generation)
- Fire HD 8 (10th Generation)
- Fire HD 10 (11th Generation)
- Fire Max 11 (13th Generation)
- Fire 7 (12th Generation)
- Fire 10 HD (13th Gen.)
Free Kindle Reading Apps
- Kindle for Android Tablets
- Kindle for Android
- Kindle for iPhone
- Kindle for iPad
- Kindle for PC
- Kindle for Web
- Kindle for Mac
Shop this series
See full series- Kindle Price:€89.18includes VAT-includes VATBy clicking on the above button, you agree to Amazon's Terms of conditions and to our Terms of Use
Sold by: Amazon Media EU S.à r.l.
- Kindle Price:€126.67includes VAT-includes VATBy clicking on the above button, you agree to Amazon's Terms of conditions and to our Terms of Use
Sold by: Amazon Media EU S.à r.l.
Shop this series
Sold by: Amazon Media EU S.à r.l.
Sold by: Amazon Media EU S.à r.l.
This option includes 3 books.
This option includes 4 books.
Why can't I get these titles?
Under regulatory requirements, teens need a parent or guardian to buy or borrow titles. Ask your parent or guardian to acquire these titles for this account from their device. These books will appear in your Kindle library once they do.
Customers who read this book also read
Safety and product resources
Images and contacts
Safety and product resources
Issue loading the information
Images and contacts
Product description
Review
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 .
Excerpt. © Reprinted by permission. All rights reserved.
Imagine the following scenario. You come from a design meeting with a couple of printed diagrams, scribbled with your annotations. Okay, the event type passed between these objects is not char anymore; its int. You change one line of code. The smart pointers to Widget are too slow; they should go unchecked. You change one line of code. The object factory needs to support the new Gadget class just added by another department. You change one line of code.
You changed the design. Compile. Link. Done.
Well, there is something wrong with this scenario, isn't there? A much more likely scenario is this: You come from the meeting in a hurry because you have a pile of work to do. You fire a global search. You perform surgery on code. You add code. You introduce bugs. You remove the bugs . . . that's the way a programmers job is, right? Although this book cannot possibly promise you the first scenario, it is nonetheless a resolute step in that direction. It tries to present C++ as a newly discovered language for software architects.
Traditionally, code is the most detailed and intricate aspect of a software system. Historically, in spite of various levels of language support for design methodologies (such as object orientation), a significant gap persisted between the blueprints of a program and its code because the code must take care of the ultimate details of the implementation and of many ancillary tasks. The intent of the design is, more often than not, dissolved in a sea of quirks.
This book presents a collection of reusable design artifacts, called generic components, together with the techniques that make them possible. These generic components bring their users the well-known benefits of libraries, but in the broader space of system architecture. The coding techniques and the implementations provided focus on tasks and issues that traditionally fall in the area of design, activities usually done before coding. Because of their high level, generic components make it possible to map intricate architectures to code in unusually expressive, terse, and easy-to-maintain ways.
Three elements are reunited here: design patterns, generic programming, and C++. These elements are combined to achieve a very high rate of reuse, both horizontally and vertically. On the horizontal dimension, a small amount of library code implements a combinatorial and essentially open-ended number of structures and behaviors. On the vertical dimension, the generality of these components makes them applicable to a vast range of programs.
This book owes much to design patterns, powerful solutions to ever-recurring problems in object-oriented development. Design patterns are distilled pieces of good design recipes for sound, reusable solutions to problems that can be encountered in many contexts. Design patterns concentrate on providing a suggestive lexicon for designs to be conveyed. They describe the problem, a time-proven solution with its variants, and the consequences of choosing each variant of that solution. Design patterns go above and beyond anything a programming language, no matter how advanced, could possibly express. By following and combining certain design patterns, the components presented in this book tend to address a large category of concrete problems.
Generic programming is a paradigm that focuses on abstracting types to a narrow collection of functional requirements and on implementing algorithms in terms of these requirements. Because algorithms define a strict and narrow interface to the types they operate on, the same algorithm can be used against a wide collection of types. The implementations in this book use generic programming techniques to achieve a minimal commitment to specificity, extraordinary terseness, and efficiency that rivals carefully handcrafted code.
C++ is the only implementation tool used in this book. You will not find in this book code that implements nifty windowing systems, complex networking libraries, or clever logging mechanisms. Instead, you will find the fundamental components that make it easy to implement all of the above, and much more. C++ has the breadth necessary to make this possible. Its underlying C memory model ensures raw performance, its support for polymorphism enables object-oriented techniques, and its templates unleash an incredible code generation machine. Templates pervade all the code in the book because they allow close cooperation between the user and the library. The user of the library literally controls he way code is generated, in ways constrained by the library. The role of a generic component library is to allow user-specified types and behaviors to be combined with generic components in a sound design. Because of the static nature of the technique used, errors in mixing and matching the appropriate pieces are usually caught during compile time.
This books manifest intent is to create generic components preimplemented pieces of design whose main characteristics are flexibility, versatility, and ease of use. Generic components do not form a framework. In fact, their approach is complementary whereas a framework defines interdependent classes to foster a specific object model, generic components are lightweight design artifacts that are independent of each other, yet can be mixed and matched freely. They can be of great help in implementing frameworks.
Product details
- ASIN : B00AU3JUHG
- Publisher : Addison-Wesley Professional
- Accessibility : Learn more
- Publication date : 13 Feb. 2001
- Edition : 1st
- Language : English
- File size : 30.2 MB
- Screen Reader : Supported
- Enhanced typesetting : Enabled
- X-Ray : Not Enabled
- Word Wise : Not Enabled
- Print length : 353 pages
- ISBN-13 : 978-0133387612
- Page Flip : Enabled
- Part of series : C++ In-Depth
- Reading age : 18 years and up
- Best Sellers Rank: 1,108,548 in Kindle Store (See Top 100 in Kindle Store)
- 239 in Programming with C (English)
- 1,066 in C++
- 2,596 in Programming Languages & Tools (English)
- Customer reviews:
About the author

Andrei Alexandrescu coined the colloquial term "modern C++", used today to describe a collection of important C++ styles and idioms. His eponymous book on the topic, Modern C++ Design: Generic Programming and Design Patterns Applied (Addison-Wesley, 2001), revolutionized C++ programming and produced a lasting influence not only on subsequent work on C++, but also on other languages and systems. With Herb Sutter, Andrei is also the coauthor of C++ Coding Standards: 101 Rules, Guidelines, and Best Practices (Addison-Wesley, 2004). Through Andrei's varied work on libraries and applications, as well as his research in machine learning and natural language processing, he has garnered a solid reputation in both industrial and academic circles. Since 2006, he has been second-in-command to Walter Bright, the D programming language inventor and initial implementer. Andrei has been the key designer of many important features of D and has authored a large part of D's standard library, positioning him to write an authoritative book on the new language, appropriately entitled, The D Programming Language. Andrei holds a Ph.D. in Computer Science from the University of Washington and a B.Sc. in Electrical Engineering from University "Politehnica" Bucharest. He works as a Research Scientist for Facebook.
Customer reviews
Customer Reviews, including Product Star Ratings, help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyses reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from Germany
There was a problem filtering reviews. Please reload the page.
-
Reviewed in Germany on 2 April 2017Format: PaperbackVerified Purchasein diesem Sachbuch werden viele spezielle Techniken vermittelt (so zB. generische Policies über Templates), die selbst einem erfahrenem C++ Entwickler noch einiges abverlangen werden. Meiner Meinung nach eine verpflichtende Lektüre für jeden C++ Entwickler, wer denkt C++ als Programmiersprache verstanden zu haben wird in diesem Buch von Herrn Alexandrescu eines besseren belehrt werden und das auf einen sehr angenehme Art (jeder der schon einmal einen Vortrag von Herrn Alexandrescu beiwohnen durfte und seine hurmorvolle Art kennt, wird hier positiv Überrascht sein).
- Reviewed in Germany on 25 January 2023Format: PaperbackVerified PurchaseNothing to say, just love the book if your into C++
- Reviewed in Germany on 7 March 2013Format: PaperbackVerified PurchaseOne of my favorite books in my collection. This was the first time I heard of policy-based class designs, which I use now frequently where they fit. Who ever is writing C++ code should have read this book.
-
Reviewed in Germany on 11 March 2010Format: PaperbackDas Buch ist ein Muss, will man sich als C++ Programmierer weiter entwickeln und mit Template (Meta)programmierung auseinander setzen. Loki ist heute sicher durch Boost obsolet, aber zum Erlernen der vorstellten Techniken sicher hilfreich.
-
Reviewed in Germany on 25 July 2002Format: PaperbackEndlich wieder einmal ein Buch für fortgeschrittene C++ Programmierer. Ähnlich wie seinerzeit Scott Meyers (Effective C++) erläutert Alexandrescu grundlegend neue Aspekte der Umsetzung von Design Pattern mit Hilfe von C++ Templates. Er fängt dort an, wo alle anderen C++ Bücher aufhören. Viel weiter als das GoF Buch geht er mit Singleton, Smart Pointers, Factories und Visitor. Im Anhang erklärt er wichtige Aspekte zu Multithreading.
-
Reviewed in Germany on 3 January 2016Format: Kindle EditionVerified PurchaseDie Sonderzeichen im Code werden oft nicht korrekt formatiert.
Z.B. zeigt der Kindle Reader
static void Check(T)* {}
wobei
static void Check(T*) {}
gemeint ist.
Code im Fließtext:
...an lvalue of type T. *SmartPtr calls Check, ...
gemeint ist vrmtl.
...an lvalue of type T*. SmartPtr calls Check, ...
Und zahllose weitere Beispiele bei denen auch nicht immer so klar ist was genau falsch gelaufen ist in der Kindle Formatierung.
Top reviews from other countries
krishna kumar thakurReviewed in India on 24 June 20195.0 out of 5 stars Must read, reread and read again.
One of the best c++ book. Though its not suitable for begineers but if someone really want to know template, its for them. It require you have some idea on template, but you'll find yourself thinking in templates. Genious template tricks. If read carefully you'll learn design, best c++ practice, and patterns. Just get template idea before reading this book. Andrie is genious.
-
MicReviewed in France on 21 December 20095.0 out of 5 stars Un joyau d'astuces
Format: PaperbackVerified PurchaseSi vous cherchez à savoir ce qu'est la métaprogrammation en C++ ce livre est définitivement fait pour vous.
Vous n'aurez besoin pour le lire que de savoir les règles de base concernant les templates en C++ (et être à l'aise avec), et Alexandrescu vous guide vers la compréhension de ses constructions toutes plus étonnantes et remarquables les unes que les autres.
C'est une véritable façon de programmer "at compile-time" qu'il offre au programmeur.
Ces méthodes ne sont cependant pas très utilisées en environnement de production (utilisation lourde des macros, temps de compilation rallongés, maintenabilité discutable) et on admirera donc plus la beauté des objets que leur éventuelle réelle utilité.
C'est en tout cas un moyen étonnant de voir comment les règles d'apparence inoffensives des templates C++ offrent finalement un pouvoir d'expressivité très riche.
Ayon Md Farhabi HelalReviewed in Japan on 26 October 20195.0 out of 5 stars Didn’t expect much but Surprised by the Quality
Format: PaperbackVerified PurchaseI wanted some books to review my C++ skills and suddenly found out this deal. The price was in such a sweet spot that I couldn’t ignore it. To be honest, I was not expecting much. Anything readable would be acceptable for me. But I was amazed when I got it in my hands. The book was in a great condition for its price. I would love to buy again from them.
AnkurReviewed in the United States on 25 November 20105.0 out of 5 stars Exceptional material
Format: PaperbackVerified PurchaseThe material presented in this book is mainly for library writers and senior developers who are in charge of software design. Having said that, the material here is unlike you'll find in any other book. Author discusses design and implementation of reusable components like a (very sophisticated) singleton, visitor, generalized functors, smart pointers, etc. I found discussions on smart pointers and singleton to be particularly enlightening. Its amazing how a simple design pattern like singleton could have so many intricacies.
But the chapter which blew me away was that of typelists, and what author achieves by using simple metaprogramming constructs (although I would be the first one to admit that a mere mortal software developer like myself would not be using typelists everyday, but its still fun to learn about them).
This book is very different from whatever material I had read earlier on C++. Do read this book once you are familiar with topics like templates, common design patterns and smart pointers.
Onorato VaticoneReviewed in Italy on 17 May 20145.0 out of 5 stars A must-read book!
Format: Kindle EditionVerified PurchaseYou really have to read this book! It's much more than "modern C++ design".
. . . . . .












