O'Reilly logo

C++ Primer, Fourth Edition by Barbara E. Moo, Josée Lajoie, Stanley B. Lippman

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 11. Generic Algorithms

CONTENTS

Section 11.1 Overview 392

Section 11.2 A First Look at the Algorithms 395

Section 11.3 Revisiting Iterators 405

Section 11.4 Structure of Generic Algorithms 419

Section 11.5 Container-Specific Algorithms 421

Chapter Summary 424

Defined Terms 424

The library containers define a surprisingly small set of operations. Rather than adding lots of functionality to the containers, the library instead provides a set of algorithms, most of which are independent of any particular container type. These algorithms are generic: They operate on different types of containers and on elements of various types.

The generic algorithms, and a more detailed look at iterators, form the subject matter of this chapter.

The standard ...

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