6 Library introduction [library]

6.1 General [library.general]

This Clause describes the contents of the Ranges library, how a well-formed C++ program makes use of the library, and how a conforming implementation may provide the entities in the library.

Clause [requirements], Clauses [concepts.lib] through [numerics], and Annex [depr] specify the contents of the library, as well as library requirements and constraints on both well-formed C++ programs and conforming implementations.

Detailed specifications for each of the components in the library are in Clauses [concepts.lib][numerics], as shown in Table [tab:library.categories].

Table 1 — Library categories
Clause Category
[concepts.lib] Concepts library
[utilities] General utilities library
[iterators] Iterators library
[ranges] Ranges library
[algorithms] Algorithms library
[numerics] Numerics library

The concepts library (Clause [concepts.lib]) describes library components that C++ programs may use to perform compile-time validation of template parameters and perform function dispatch based on properties of types.

The general utilities library (Clause [utilities]) includes components used by other library elements and components used as infrastructure in C++ programs, such as function objects.

The iterators library (Clause [iterators]) describes components that C++ programs may use to perform iterations over containers (Clause ISO/IEC 14882:2014 §[containers]), streams ( ISO/IEC 14882:2014 §[iostream.format]), stream buffers ( ISO/IEC 14882:2014 §[stream.buffers]), and ranges ([ranges]).

The ranges library (Clause [ranges]) describes components for dealing with ranges of elements.

The algorithms library (Clause [algorithms]) describes components that C++ programs may use to perform algorithmic operations on containers (Clause ISO/IEC 14882:2014 §[containers]) and other sequences.

The numerics library (Clause [numerics]) provides concepts that are useful to constrain numeric algorithms.