Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14

Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14

  • Downloads:5337
  • Type:Epub+TxT+PDF+Mobi
  • Create Date:2021-03-26 13:19:14
  • Update Date:2025-09-07
  • Status:finish
  • Author:Scott Meyers
  • ISBN:1491903996
  • Environment:PC/Android/iPhone/iPad/Kindle

Summary

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++。

Topics include:


The pros and cons of braced initialization, noexcept specifications, perfect forwarding, and smart pointer make functions
The relationships among std:: movestd:: 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

Download

Reviews

Kamil

Good source of knowledge about good practices in newer versions of C++, however, this is not a book for beginners as the author assumes that the reader has knowledge about more advanced topics。

Mdlsr

A great read on c++! It might be hard to read if you're new to the language and it's definitely not the first book you should read。 But if you already have some exposure or you might just remember your university course good enough this book is for you。 Not only you'll learn many tips and tricks but you'll love the language。 Yes, c++ can be beautiful。 A great read on c++! It might be hard to read if you're new to the language and it's definitely not the first book you should read。 But if you already have some exposure or you might just remember your university course good enough this book is for you。 Not only you'll learn many tips and tricks but you'll love the language。 Yes, c++ can be beautiful。 。。。more

Mihai-Alin Şendre

Being a beginner C++ developer myself (coming from a heavy C background), this book helped me recognize a lot of language features that I had no idea C++11/14 has - and even C++98 features too。 The way Scott Meyers instruments its explanations via examples is extremely effective and it definitely gripped my attention。 Combine it with an internet search engine and you'll learn a lot of cool stuff。 Highly recommended for C/C++ developers that want to improve on those low-level programming skills。 Being a beginner C++ developer myself (coming from a heavy C background), this book helped me recognize a lot of language features that I had no idea C++11/14 has - and even C++98 features too。 The way Scott Meyers instruments its explanations via examples is extremely effective and it definitely gripped my attention。 Combine it with an internet search engine and you'll learn a lot of cool stuff。 Highly recommended for C/C++ developers that want to improve on those low-level programming skills。 。。。more

Sahil Singh

This little book is Swiss army knife of C++。It's small, concise, and very "effective"。One of the tenets of this book is that it doesn't just tell you what you should do without also explaining the underlying mechanics。 Some topics went over my head, and therefore 4 stars instead of 5。PS: Did you know the animals(animal kingdom) on O'Reilly book covers are all engaged ones? This little book is Swiss army knife of C++。It's small, concise, and very "effective"。One of the tenets of this book is that it doesn't just tell you what you should do without also explaining the underlying mechanics。 Some topics went over my head, and therefore 4 stars instead of 5。PS: Did you know the animals(animal kingdom) on O'Reilly book covers are all engaged ones? 。。。more

Serial_experiments

Разъяснены многие нюансы языка, как всегда из минусов косноязычное написания Мэерса。

Sadia Nahreen

I see this book as a set of resourceful guidelines for using C++ efficiently for the use case of software engineering。 The author focuses not only on performance but very often also on coder’s convenience when it matters during making design/coding decisions。 However, this book can not replace a C++ primer book that you should read prior to this in order to know what the author is talking about for several chapters。 But even without a primer this book will work just fine as long as you have some I see this book as a set of resourceful guidelines for using C++ efficiently for the use case of software engineering。 The author focuses not only on performance but very often also on coder’s convenience when it matters during making design/coding decisions。 However, this book can not replace a C++ primer book that you should read prior to this in order to know what the author is talking about for several chapters。 But even without a primer this book will work just fine as long as you have some experience in working in a C++ codebase that uses C++11/14 features。 。。。more

Bipul Kumar

pretty great book, loved reading it

Arthur Kipel

Almost every chapter of this book has the following structure:1。 Example of how to use some kind of feature, profit of this feature。 Everything clear。2。 How not to use this feature, different side effects。 Everything becomes not so obvious。 I knew that C++ is rather difficult language which provides possibility to micro-optimize programs, but after reading this book I want to continue using C++ in the most straightforward way, without over-complicated features。 Maybe understanding of some C++ co Almost every chapter of this book has the following structure:1。 Example of how to use some kind of feature, profit of this feature。 Everything clear。2。 How not to use this feature, different side effects。 Everything becomes not so obvious。 I knew that C++ is rather difficult language which provides possibility to micro-optimize programs, but after reading this book I want to continue using C++ in the most straightforward way, without over-complicated features。 Maybe understanding of some C++ concepts will come to me with experience but for now I'm not ready to use it with confidence。 So if use-case allows not to use C++ I would like to avoid it。 。。。more

Ovidiu Neatu

This could have been titled "Why nobody fully understands rvalues, move semantics and universal references: here's 42 reasons why this is true" This could have been titled "Why nobody fully understands rvalues, move semantics and universal references: here's 42 reasons why this is true" 。。。more

Susan

Did a more detailed reading this time and it's very illuminating! Did a more detailed reading this time and it's very illuminating! 。。。more

Kyle Hamilton

Great but extremely dense material。 Compared to the Effective C++ book, the applications for this material are a lot less frequent。

Allister Levi Sanchez

It's a great book for intermediate to experienced C++ developers who are used to C++98 or C++0x to have a good grasp of "modern" C++, i。e。 C++11 and C++14。 It's a great book for intermediate to experienced C++ developers who are used to C++98 or C++0x to have a good grasp of "modern" C++, i。e。 C++11 and C++14。 。。。more

Tsvetomir

Another excellent C++ book by Scott Meyers。 Contains useful information about how various features of C++11/14 work and how they should be used。I highly recommend this book for anyone who wants to be a C++ expert。

Nick Mullican

Good book but need to have a deep knowledge of C++ to total understand some sections

Anton Tarasov

Приятно рассказанны основные нововведения C++11/C++14。Достаточно для понимания, но при этом лаконично。

Keith Walfson

It's a good book, a good read。 Time well spent, I'm sure i will be using many of the things I learned here in my upcoming projects。 It's a good book, a good read。 Time well spent, I'm sure i will be using many of the things I learned here in my upcoming projects。 。。。more

Moritz

Very good book about how to apply some new features of C++ 11/14。 However, as the title already mentions: This is not a book to learn C++ in the first place, its goal is to help people who already know C++ to improve their use of the new features。 So this book should be the second or third book you read on C++。 It should not be your first。 (Speaking from first hand experience)The book is very informative, very useful and practical and written in a great style。 I actually found it to be quite fun Very good book about how to apply some new features of C++ 11/14。 However, as the title already mentions: This is not a book to learn C++ in the first place, its goal is to help people who already know C++ to improve their use of the new features。 So this book should be the second or third book you read on C++。 It should not be your first。 (Speaking from first hand experience)The book is very informative, very useful and practical and written in a great style。 I actually found it to be quite funny from time to time。 That is something I did not expect from a book on this topic。Recommended for everyone already familiar with C++ who wants to further improve。 。。。more

Joe

Awesome read to level up your c++ game in the post-11 world! I learned a lot from this book, and the way it is organized makes it an invaluable reference; I fully intend to go over the concurrency chapter again (and again)。

Sergey

I finished this as a part of my work book-club ~5 weeks ago。 It's a much more applicable book than the original。 The meat is in understanding the implications of r/l-value semantics in all the new constructs。 Here is a list of the most important sections from these two books。EffectiveModernCpp* 5 : prefer auto to explicit type declarations* 7 : distinguish between () and {} when creating objects, prefer {}* 8 : use nullptr instead of null* 9 : prefer using myType=othertype to typedef existingTyp I finished this as a part of my work book-club ~5 weeks ago。 It's a much more applicable book than the original。 The meat is in understanding the implications of r/l-value semantics in all the new constructs。 Here is a list of the most important sections from these two books。EffectiveModernCpp* 5 : prefer auto to explicit type declarations* 7 : distinguish between () and {} when creating objects, prefer {}* 8 : use nullptr instead of null* 9 : prefer using myType=othertype to typedef existingType myType;* 11 : prefer deleted functions to private undefined ones and/or delete functions you don't want* 12 : declare override functions override* 13 : prefer const\_iterators to iterators* 14 : declare functions noexcept if they won't emit an exception* 15 : spam constexpr (I think the need is being reduced in c++20)* 16 : const implies thread-safe, so make const member functions thread safe* 18 : Pretty much use unique\_ptr's instead of pointers* 23 : use std:move on rvalue refs and std::forward on universal refs* 32 : Use init capture to move objects into closures, this also lets you alias them* 33 : `[](auto&& x){ return someCrustyFunction(std::forward(x));}`* 35 : Prefer task-based programming to thread-based, but (36) use an actual async policyEffectiveCpp* 3 : Use const whenever possible* 4 : Always, always initialize* 14 : Think carefully about copying behavior in resource-managing classes* 19 : Treat class design as type design* 35 : Consider alternatives to virtual functions, like nvi, template patterns, and aggregation* 53 : Use max compiler warnings 。。。more

Paweł Rusin

I'm still learning C++ so a lot of this book content went over my head。 But it's so interesting to see that "advanced level" may mean different things when it comes to a book on a programming language。 For C++ it's all about making the best use of such things as type inference or move semantics, to squeeze every bit of performance from the compiler and the underlying hardware。 Not really a book to learn C++, but an amazing resource to expand your mind and a point of reference when fighting with I'm still learning C++ so a lot of this book content went over my head。 But it's so interesting to see that "advanced level" may mean different things when it comes to a book on a programming language。 For C++ it's all about making the best use of such things as type inference or move semantics, to squeeze every bit of performance from the compiler and the underlying hardware。 Not really a book to learn C++, but an amazing resource to expand your mind and a point of reference when fighting with compiler over some cryptic error messages。 。。。more

Maksym Bondarenko

Great book。 However, it seems to be for experienced C++ engineers。 Every chapter in the book is about some very subtle situation。 I feel like I would need to come back to this book later。

Jason Copenhaver

Lot of great features being added to C++。 And as always Scott Meyers presents stuff in an excellent way。

Joshua Gerrard

Helps to our understand how to use modern C++ to achieve your goals in a well written and accurate fashion。

Woolstar

There are now ten ways to solve any problem in C++。 This book is not as much a prescription, as a cookoff with current technology to reveal what you might end up with。 Some what interesting, but destined to age poorly as compilers, the language, and the platforms move forward。

Philippe Milot

Great counsel, but sometimes the examples are not very elaborated, and often too abstract。 Still, it's an essential read for any C++ programmer。 Great counsel, but sometimes the examples are not very elaborated, and often too abstract。 Still, it's an essential read for any C++ programmer。 。。。more

Michael

Good advice about move semantics, but fairly dry for my tastes。

Jacob

This is a very good approachable book about the changes that have happened to the C++ language over the last several years, but。。。 it's a book about the changes that have happened to the C++ language over the last 10 years。 It's very technical and the nature of the content is dry。 The author does a great job making it as interesting as possible, and if you want to develop using the modern features of the C++ programming language, you should read it, but it's still going to be work to read, no ma This is a very good approachable book about the changes that have happened to the C++ language over the last several years, but。。。 it's a book about the changes that have happened to the C++ language over the last 10 years。 It's very technical and the nature of the content is dry。 The author does a great job making it as interesting as possible, and if you want to develop using the modern features of the C++ programming language, you should read it, but it's still going to be work to read, no matter what。 Still glad I read it, though。 。。。more

Yash Patel

Goes over a lot of the new idioms in modern C++ and does a great job distilling RAII/smart pointers and his discussions of rvalue/move semantics。 Definitely not the best book for learning C++ initially (Accelerated C++ is much better for that), but nice for fixing up important implementation details。

Michal Fizek

Again, top of the tops books about c++。