O'Reilly logo

Exceptional C++ Style 40 New Engineering Puzzles, Programming Problems, and Solutions by Herb Sutter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 23. To new, Perchance to throw, Part 2: Pragmatic Issues in Memory Management

Difficulty: 5

Avoid using new(nothrow), and make sure that when you're checking for new failure, you're really checking what you think you're checking.

Solution

In the previous Item, I illustrated and justified the following coding guideline:

  • Any class that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required