Chapter 5. Utilities
This chapter describes the general utilities of the C++ standard library. These utilities are small and simple classes, types, or functions that perform frequently needed tasks:
• Class pair<> and class tuple<>
• Smart pointer classes (class shared_ptr<> and class unique_ptr)
• Numeric limits1
1 One could argue that numeric limits and class ratio<> should be part of Chapter 17, which covers numerics, but these classes are used in some other parts of the library, so I decided to describe them here.
• Type traits and type utilities
• Auxiliary functions (for example, min(), max(), and swap())
• Class ratio<>1
• Clocks and timers
• Some important C functions
Most, but not all, of these utilities are described in clause 20, “General ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access