Reader-supported: when you buy through links on our site, we may earn an affiliate commission. Learn more

Cover of More Effective C++
Buy on AmazonBuy on Bookshop.orgListen on Audible

We earn a commission if you buy through these links. Learn more

More Effective C++

by Scott Meyers

Thirty-five focused, example-driven rules for writing C++ that is more efficient, correct, and easier to design, from a writer who explains the reasons behind each guideline.

What It's About

More Effective C++ is a set of 35 separate guidelines, each presented as an item with a short argument, code examples showing a common mistake, and the reasoning behind the fix. It follows Meyers' earlier Effective C++ and targets working programmers who already know the language basics and want fewer subtle bugs and better designs. Rather than a tutorial, it reads like a series of pointed case studies about code that compiles cleanly but behaves badly.

The material spans several areas: how pointers and references differ in practice, the traps in operator overloading, exception safety, memory management and resource handling, performance tuning, and techniques such as proxy classes and reference counting. Meyers is blunt about tradeoffs. He often shows a design that looks reasonable, then explains why it surprises people or costs more than it appears to.

Reading it is a quick and pleasant experience, since each item stands on its own and you can dip in anywhere. The tone is direct and a little wry. Expect to spend as much time with the code as with the prose, and to run a few examples yourself. Many items reward a second reading once you have built real systems and hit the problems they describe.

Read this if you…

  • already know C++ basics and want to avoid subtle bugs in real code
  • are writing libraries or class hierarchies that other people will use
  • liked Effective C++ and want its more advanced sequel

Skip it if you…

  • are a beginner who needs the language fundamentals first
  • want guidance on modern C++11 and later features such as move semantics and lambdas

Key Ideas

  1. 1

    Design classes as types, not just containers

    Meyers treats every class as a new type that others must use correctly. Implicit conversions, default constructors, and copying behavior shape how the type gets used, often in ways its author did not intend. The book shows how small choices in the interface can quietly invite overload surprises and hard-to-find errors, and why making some behavior explicit is usually safer.

  2. 2

    Operator overloading should match built-in expectations

    Overloaded operators should behave the way programmers expect from built-in types. The book covers the difference between prefix and postfix forms, and explains why overloading the logical and comma operators is risky: you lose the short-circuit evaluation and ordering guarantees that built-in versions provide, which can break code that looked fine.

  3. 3

    Exceptions demand careful resource ownership

    A thrown exception can interrupt a function at any point, so resources must be released reliably. The book leans on the idea of letting objects manage resources, so cleanup happens during destruction. It also explores how partial construction, failed constructors, and exceptions raised from destructors can leak resources or terminate programs if not handled with care.

  4. 4

    Performance comes from avoiding hidden work

    Many slow C++ programs pay for work the code never seems to request: temporary objects, unnecessary constructions, and copies made behind the scenes. Meyers encourages understanding where these costs come from and avoiding them in the design, rather than tweaking code blindly. The advice is most useful when paired with measurement, so you focus on the costs that actually matter.

  5. 5

    Techniques for controlling objects and their use

    The later items introduce patterns for managing how objects are created and accessed. Proxy classes can separate an interface from its implementation, reference counting can share resources safely, and restricting where objects may live, such as on the heap or in limited numbers, can enforce design intent. These techniques show how the language features can be bent into more reliable designs.

Limitations

The book was written for the C++98 era, and much of its guidance predates move semantics, the standard smart pointers, lambdas, and constexpr. Some advice on exceptions, templates, and compiler behavior reflects older toolchains and may no longer apply as written. It does not cover concurrency or most modern idioms. Its item format is dense with code, and some readers find the examples repetitive or the topics narrower than they expected.

Questions Readers Ask

Is More Effective C++ still worth reading in the C++11 era?
Yes, mainly for its reasoning about classes, operators, and exception safety, which still holds. However, parts on smart pointers, resource management, and performance are outdated. Pair it with Meyers' Effective Modern C++ and current standard guidance so you can separate timeless advice from items tied to older language versions.
How does it compare to Effective C++?
Effective C++ focuses on foundational practices for writing classes and everyday code. More Effective C++ goes after subtler pitfalls and more advanced techniques, with a stronger emphasis on exceptions and performance. If you are unsure, start with Effective C++, since the sequel assumes you are comfortable with the vocabulary and habits it builds.
Do I need to read Effective C++ first?
Not strictly. Each item in More Effective C++ is largely self-contained, so you can read it independently. Still, the first book establishes many of the ideas the sequel builds on, and readers often find the later items clearer after reading it.
Published
1995
ISBN
9780201633719
Difficulty
intermediate
Category
Tech

Book details and cover from Google Books.

Ready to read More Effective C++?

Get your copy on Amazon, or listen to it on Audible. We earn a commission if you buy through these links.

Explore More