[requirements]
# 16 Library introduction [[library]](./#library)
## 16.4 Library-wide requirements [requirements]
### [16.4.1](#general) General [[requirements.general]](requirements.general)
[1](#general-1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1087)
Subclause [requirements] specifies requirements that apply to the entire C++ standard library[.](#general-1.sentence-1)
[[support]](support "17 Language support library") through [[exec]](exec "33 Execution control library") and [[depr]](depr "Annex D (normative) Compatibility features") specify the requirements of individual entities within the library[.](#general-1.sentence-2)
[2](#general-2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1092)
Requirements specified in terms of interactions between threads do not apply to
programs having only a single thread of execution[.](#general-2.sentence-1)
[3](#general-3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1096)
[[organization]](#organization "16.4.2 Library contents and organization") describes the library's contents and
organization, [[using]](#using "16.4.3 Using the library") describes how well-formed C++ programs gain access to library
entities,[[utility.requirements]](#utility.requirements "16.4.4 Requirements on types and expressions") describes constraints on types and functions used with
the C++ standard library,[[constraints]](#constraints "16.4.5 Constraints on programs") describes constraints on well-formed C++ programs, and[[conforming]](#conforming "16.4.6 Conforming implementations") describes constraints on conforming implementations[.](#general-3.sentence-1)
### [16.4.2](#organization) Library contents and organization [[organization]](organization)
#### [16.4.2.1](#organization.general) General [[organization.general]](organization.general)
[1](#organization.general-1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1109)
[[contents]](#contents "16.4.2.2 Library contents") describes the entities and macros defined in the C++ standard library[.](#organization.general-1.sentence-1)
[[headers]](#headers "16.4.2.3 Headers") lists the standard library headers and some constraints on those headers[.](#organization.general-1.sentence-2)
[[compliance]](#compliance "16.4.2.5 Freestanding implementations") lists requirements for a freestanding implementation of the C++
standard library[.](#organization.general-1.sentence-3)
#### [16.4.2.2](#contents) Library contents [[contents]](contents)
[1](#contents-1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1117)
The C++ standard library provides definitions
for the entities and macros described in the synopses
of the C++ standard library headers ([[headers]](#headers "16.4.2.3 Headers")),
unless otherwise specified[.](#contents-1.sentence-1)
[2](#contents-2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1123)
All library entities exceptoperator new andoperator delete are defined within the namespacestd or namespaces nested within namespacestd[.](#contents-2.sentence-1)[142](#footnote-142 "The C standard library headers ([support.c.headers]) also define names within the global namespace, while the C++ headers for C library facilities ([headers]) can also define names within the global namespace.")
It is unspecified whether names declared in a specific namespace are declared
directly in that namespace or in an inline namespace inside that
namespace[.](#contents-2.sentence-2)[143](#footnote-143 "This gives implementers freedom to use inline namespaces to support multiple configurations of the library.")
[3](#contents-3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1146)
Whenever an unqualified name other thanswap, make_error_code, make_error_condition,from_stream, orsubmdspan_mapping is used in the specification of a declaration D in [[support]](support "17 Language support library") through [[exec]](exec "33 Execution control library") or [[depr]](depr "Annex D (normative) Compatibility features"),
its meaning is established
as-if by performing unqualified name lookup ([[basic.lookup.unqual]](basic.lookup.unqual "6.5.3 Unqualified name lookup"))
in the context of D[.](#contents-3.sentence-1)
[*Note [1](#contents-note-1)*:
Argument-dependent lookup is not performed[.](#contents-3.sentence-2)
â *end note*]
Similarly, the meaning of a [*qualified-id*](expr.prim.id.qual#nt:qualified-id "7.5.5.3 Qualified names [expr.prim.id.qual]") is established
as-if by performing qualified name lookup ([[basic.lookup.qual]](basic.lookup.qual "6.5.5 Qualified name lookup"))
in the context of D[.](#contents-3.sentence-3)
[*Example [1](#contents-example-1)*:
The reference to is_array_v in the specification of std::to_array ([[array.creation]](array.creation "23.3.3.6 Array creation functions")) refers to ::std::is_array_v[.](#contents-3.sentence-4)
â *end example*]
[*Note [2](#contents-note-2)*:
Operators in expressions ([[over.match.oper]](over.match.oper "12.2.2.3 Operators in expressions")) are not so constrained;
see [[global.functions]](#global.functions "16.4.6.4 Non-member functions")[.](#contents-3.sentence-5)
â *end note*]
The meaning of the unqualified name swap is established
in an overload resolution context
for swappable values ([[swappable.requirements]](#swappable.requirements "16.4.4.3 Swappable requirements"))[.](#contents-3.sentence-6)
The meanings of the unqualified namesmake_error_code, make_error_condition,from_stream, andsubmdspan_mapping are established
as-if by performing argument-dependent lookup ([[basic.lookup.argdep]](basic.lookup.argdep "6.5.4 Argument-dependent name lookup"))[.](#contents-3.sentence-7)
[142)](#footnote-142)[142)](#footnoteref-142)
The C standard library headers ([[support.c.headers]](support.c.headers "17.15 C headers")) also define
names within the global namespace, while the C++ headers for C library
facilities ([[headers]](#headers "16.4.2.3 Headers")) can also define names within the global namespace[.](#footnote-142.sentence-1)
[143)](#footnote-143)[143)](#footnoteref-143)
This gives implementers freedom to use inline namespaces to
support multiple configurations of the library[.](#footnote-143.sentence-1)
#### [16.4.2.3](#headers) Headers [[headers]](headers)
[1](#headers-1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1182)
Each element of the C++ standard library is declared or defined (as appropriate) in a[*header*](#def:header "16.4.2.3 Headers [headers]")[.](#headers-1.sentence-1)[144](#footnote-144 "A header is not necessarily a source file, nor are the sequences delimited by < and > in header names necessarily valid source file names ([cpp.include]).")
[2](#headers-2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1191)
The C++ standard library provides the[*C++ library headers*](#def:header,C++_library "16.4.2.3 Headers [headers]"),
shown in Table [24](#tab:headers.cpp "Table 24: C++ library headers")[.](#headers-2.sentence-1)
Table [24](#tab:headers.cpp) — C++ library headers [[tab:headers.cpp]](./tab:headers.cpp)
| [ð](#tab:headers.cpp-row-1)
| | | |
| --- | --- | --- | --- |
| [ð](#tab:headers.cpp-row-2)
| | | |
| [ð](#tab:headers.cpp-row-3)
| | | |
| [ð](#tab:headers.cpp-row-4)
| | | |
| [ð](#tab:headers.cpp-row-5)
| | | |
| [ð](#tab:headers.cpp-row-6)
| | | |
| [ð](#tab:headers.cpp-row-7)
| | | |
| [ð](#tab:headers.cpp-row-8)
| | | |
| [ð](#tab:headers.cpp-row-9)
| | | |
| [ð](#tab:headers.cpp-row-10)
| | | |
| [ð](#tab:headers.cpp-row-11)
| | | |
| [ð](#tab:headers.cpp-row-12)
| | | |
| [ð](#tab:headers.cpp-row-13)
| | | |
| [ð](#tab:headers.cpp-row-14)
| | | |
| [ð](#tab:headers.cpp-row-15)
| | | |
| [ð](#tab:headers.cpp-row-16)
| | | |
| [ð](#tab:headers.cpp-row-17)
| | | |
| [ð](#tab:headers.cpp-row-18)
| | | |
| [ð](#tab:headers.cpp-row-19)
| | | |
| [ð](#tab:headers.cpp-row-20)
| | | |
| [ð](#tab:headers.cpp-row-21)
|