35. Utilities

The time you enjoy wasting is not wasted time.

– Bertrand Russell

Introduction

Time

duration; time_point; Clocks; Time Traits

Compile-Time Rational Arithmetic

Type Functions

Type Traits; Type Generators

Minor Utilities

move() and forward(); swap(); Relational Operators; Comparing and Hashing type_info

Advice

35.1. Introduction

The standard library provides many “utility components” that are so widely useful that they are not easily classified as part of some major standard-library component.

35.2. Time

In <chrono>, the standard library provides facilities for dealing with time durations and time points. All chrono facilities are in the std::chrono (sub)namespace, so we have to either explicitly qualify with chrono:: ...

Get The C++ Programming Language, 4th Edition 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.