11. Utilities

The time you enjoy wasting is not wasted time.

– Bertrand Russell

Introduction

Resource Management

unique_ptr and shared_ptr

Specialized Containers

array; bitset; pair and tuple

Time

Function Adaptors

bind(); mem_fn(); function

Type Functions

iterator_traits; Type Predicates

Advice

11.1. Introduction

Not all standard-library components come as part of obviously labeled facilities, such as “containers” or “I/O.” This section gives a few examples of small, widely useful components. The point here is that a function or a type need not be complicated or closely tied to a mass of other functions and types to be useful. Such library components mostly act as building blocks for more powerful library facilities, including ...

Get A Tour of C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.