Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14 1st Edition, Kindle Edition
Use the Amazon App to scan ISBNs and compare prices.
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required. Learn more
Read instantly on your browser with Kindle Cloud Reader.
Using your mobile phone camera - scan the code below and download the Kindle app.
Enter your mobile phone or email address
By pressing "Send link," you agree to Amazon's Conditions of Use.
You consent to receive an automated text message from or on behalf of Amazon about the Kindle App at your mobile number above. Consent is not a condition of any purchase. Message & data rates may apply.
Coming to grips with C++11 and C++14 is more than a matter of familiarizing yourself with the features they introduce (e.g., auto type declarations, move semantics, lambda expressions, and concurrency support). The challenge is learning to use those features effectively—so that your software is correct, efficient, maintainable, and portable. That’s where this practical book comes in. It describes how to write truly great software using C++11 and C++14—i.e. using modern C++.
- The pros and cons of braced initialization, noexcept specifications, perfect forwarding, and smart pointer make functions
- The relationships among std::move, std::forward, rvalue references, and universal references
- Techniques for writing clear, correct, effective lambda expressions
- How std::atomic differs from volatile, how each should be used, and how they relate to C++'s concurrency API
- How best practices in "old" C++ programming (i.e., C++98) require revision for software development in modern C++
Effective Modern C++ follows the proven guideline-based, example-driven format of Scott Meyers' earlier books, but covers entirely new material.
"After I learned the C++ basics, I then learned how to use C++ in production code from Meyer's series of Effective C++ books. Effective Modern C++ is the most important how-to book for advice on key guidelines, styles, and idioms to use modern C++ effectively and well. Don't own it yet? Buy this one. Now".
-- Herb Sutter, Chair of ISO C++ Standards Committee and C++ Software Architect at Microsoft
The Amazon Book Review
Book recommendations, author interviews, editors' picks, and more. Read it now.
From the Publisher
From the Introduction
If you’re an experienced C++ programmer and are anything like me, you initially approached C++11 thinking, “Yes, yes, I get it. It’s C++, only more so.” But as you learned more, you were surprised by the scope of the changes. auto declarations, range-based for loops, lambda expressions, and rvalue references change the face of C++, to say nothing of the new concurrency features. And then there are the idiomatic changes. 0 and typedefs are out, nullptr and alias declarations are in. Enums should now be scoped. Smart pointers are now preferable to built-in ones. Moving objects is normally better than copying them.
There’s a lot to learn about C++11, not to mention C++14.
More importantly, there’s a lot to learn about making effective use of the new capabilities. If you need basic information about “modern” C++ features, resources abound, but if you’re looking for guidance on how to employ the features to create software that’s correct, efficient, maintainable, and portable, the search is more challenging. That’s where this book comes in. It’s devoted not to describing the features of C++11 and C++14, but instead to their effective application.
The information in the book is broken into guidelines called Items. Want to understand the various forms of type deduction? Or know when (and when not) to use auto declarations? Are you interested in why const member functions should be thread safe, how to implement the Pimpl Idiom using std::unique_ptr, why you should avoid default capture modes in lambda expressions, or the differences between std::atomic and volatile? The answers are all here. Furthermore, they’re platform-independent, Standards-conformant answers. This is a book about portable C++.
The Items in this book are guidelines, not rules, because guidelines have exceptions. The most important part of each Item is not the advice it offers, but the rationale behind the advice. Once you’ve read that, you’ll be in a position to determine whether the circumstances of your project justify a violation of the Item’s guidance. The true goal of this book isn’t to tell you what to do or what to avoid doing, but to convey a deeper understanding of how things work in C++11 and C++14.
About the Author
For more than 20 years, Scott Meyers’ Effective C++ books (Effective C++, More Effective C++, and Effective STL) have set the bar for C++ programming guidance. His clear, engaging explanations of complex technical material have earned him a worldwide following, and they keep him in demand as a trainer, consultant, and conference presenter. Winner of the 2009 Dr. Dobb’s Excellence in Programming Award, he has a Ph.D. in Computer Science from Brown University. His web site is aristeia.com.--This text refers to the paperback edition.
- ASIN : B00PGCMGDQ
- Publisher : O'Reilly Media; 1st edition (November 11, 2014)
- Publication date : November 11, 2014
- Language : English
- File size : 1567 KB
- Simultaneous device usage : Unlimited
- Text-to-Speech : Enabled
- Enhanced typesetting : Enabled
- X-Ray : Not Enabled
- Word Wise : Not Enabled
- Print length : 451 pages
- Lending : Not Enabled
- Best Sellers Rank: #71,347 in Kindle Store (See Top 100 in Kindle Store)
- Customer Reviews:
About the author
Reviews with images
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
The book examines extreme corner cases in C++ in which you could get into trouble. It assumes you already a highly experienced C++14 programmer. Language in the book is incredibly difficult, and it starts in the beginning. For example on page 16 there is some convoluted example, followed by a comment: "Yes, the syntax looks toxic, but knowing it will score you mondo points with those few souls who care."
It only gets harder from here. Meyers presents topics as if you on the same level as him, so it is written like you have 20+ years of experience in C++ and know every single language feature perfectly. I found myself having to re-read so many sentences over and over that I just kind of gave up trying to understand and kept on reading.
In many chapters the object used to explain the tip is called Widget and the functions are named something like doWork(). I would have preferred more concrete examples.
The book abrupty ends on tip 42 and there is no conclusion. For someone who has worked with C++ as long as Meyers I would have expected more here in terms of a meta-view. Surely he has some opinion on where the language is headed?
This might be a 5-star book for the most experienced of C++ programmers, but if you are just looking to brush up your C++ skills this will be too hard.
On the other hand, if you have a lot of experience with C++ and know about most of its advanced details, I think this book will be great for you.
Sometimes, the author spends too much time explaining multiple "wrong code" options just to give you the final "correct code" answer at the end.
The book is fun, full of jokes, but at the same time depressing. Makes you want to stop using C++ and flee to another programming language.
I often found the examples tending toward opacity. There were lots of "but this could be done better" comments on many, and getting down to the details sometimes got difficult. And, although, the new features tend towards brevity and towards elimination of redundant declarations, they sometimes work against easy understanding of the code. So, on the whole, it says things that matter. Many could have been said better, though, and some things need to be taken in moderation.
If you're brand new to C++, I would recommend reading either Meyer's older Effective C++, C++ Primer, or Stroustrup's novice book (Programming and Principles Using C++) to get the most out of this book. While this book is probably my favorite of all C++11 books, its targeted audience appears to be towards developers that have at least worked with C++98 before and have strong understanding of the basics.
Top reviews from other countries
Having said that, even the easier bits of the book are very valuable and provide an in depth understanding of those newer elements of C++ that you are more likely to encounter and use frequently.
Following the successful pattern from the earlier 'Effective' books the bite sized items provide well-rounded guidance for using the new features when programming in C++.