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 40. Monoliths “Unstrung,” Part 4: std::string Redux

Difficulty: 6

In this Item, we enter the home stretch, and uncover a (more) modest and minimal edition of std::string.

Solution

Still More Operations That Can Be Nonmember Nonfriends

In this Item, we're in the home stretch, and the finish line is in sight. Only a few functions remain—and we'll see that all of them can be implemented as nonmember nonfriends:

  • erase (2—all but the “iter, iter” version) ...

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