This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

78
cppdraft/contents.md Normal file
View File

@@ -0,0 +1,78 @@
[contents]
# 16 Library introduction [[library]](./#library)
## 16.4 Library-wide requirements [[requirements]](requirements#contents)
### 16.4.2 Library contents and organization [[organization]](organization#contents)
#### 16.4.2.2 Library contents [contents]
[1](#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.3Headers")),
unless otherwise specified[.](#1.sentence-1)
[2](#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[.](#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[.](#2.sentence-2)[143](#footnote-143 "This gives implementers freedom to use inline namespaces to support multiple configurations of the library.")
[3](#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 "17Language support library") through [[exec]](exec "33Execution 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.3Unqualified name lookup"))
in the context of D[.](#3.sentence-1)
[*Note [1](#note-1)*:
Argument-dependent lookup is not performed[.](#3.sentence-2)
— *end note*]
Similarly, the meaning of a [*qualified-id*](expr.prim.id.qual#nt:qualified-id "7.5.5.3Qualified names[expr.prim.id.qual]") is established
as-if by performing qualified name lookup ([[basic.lookup.qual]](basic.lookup.qual "6.5.5Qualified name lookup"))
in the context of D[.](#3.sentence-3)
[*Example [1](#example-1)*:
The reference to is_array_v in the specification of std::to_array ([[array.creation]](array.creation "23.3.3.6Array creation functions")) refers to ::std::is_array_v[.](#3.sentence-4)
— *end example*]
[*Note [2](#note-2)*:
Operators in expressions ([[over.match.oper]](over.match.oper "12.2.2.3Operators in expressions")) are not so constrained;
see [[global.functions]](global.functions "16.4.6.4Non-member functions")[.](#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.3Swappable requirements"))[.](#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.4Argument-dependent name lookup"))[.](#3.sentence-7)
[142)](#footnote-142)[142)](#footnoteref-142)
The C standard library headers ([[support.c.headers]](support.c.headers "17.15C headers")) also define
names within the global namespace, while the C++ headers for C library
facilities ([[headers]](headers "16.4.2.3Headers")) 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)