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

124
cppdraft/compliance.md Normal file
View File

@@ -0,0 +1,124 @@
[compliance]
# 16 Library introduction [[library]](./#library)
## 16.4 Library-wide requirements [[requirements]](requirements#compliance)
### 16.4.2 Library contents and organization [[organization]](organization#compliance)
#### 16.4.2.5 Freestanding implementations [compliance]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1579)
Two kinds of implementations are defined:hosted and freestanding ([[intro.compliance]](intro.compliance "4.1Implementation compliance"));
the kind of the implementation isimplementation-defined[.](#1.sentence-1)
For a hosted implementation, this document
describes the set of available headers[.](#1.sentence-2)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1588)
A freestanding implementation has animplementation-defined set of headers[.](#2.sentence-1)
This set shall
include at least the headers shown in Table [27](#tab:headers.cpp.fs "Table 27: C++ headers for freestanding implementations")[.](#2.sentence-2)
Table [27](#tab:headers.cpp.fs) — C++ headers for freestanding implementations [[tab:headers.cpp.fs]](./tab:headers.cpp.fs)
| [🔗](#tab:headers.cpp.fs-row-1) | **Subclause** | **Header** |
| --- | --- | --- |
| [🔗](#tab:headers.cpp.fs-row-2)<br>[[support.types]](support.types "17.2Common definitions") | Common definitions | <cstddef> |
| [🔗](#tab:headers.cpp.fs-row-3)<br>[[cstdlib.syn]](cstdlib.syn "17.2.2Header <cstdlib> synopsis") | C standard library | <cstdlib> |
| [🔗](#tab:headers.cpp.fs-row-4)<br>[[support.limits]](support.limits "17.3Implementation properties") | Implementation properties | <cfloat>, <climits>, <limits>, |
| [🔗](#tab:headers.cpp.fs-row-5) | | <version> |
| [🔗](#tab:headers.cpp.fs-row-6)<br>[[cstdint.syn]](cstdint.syn "17.4.1Header <cstdint> synopsis") | Integer types | <cstdint> |
| [🔗](#tab:headers.cpp.fs-row-7)<br>[[support.dynamic]](support.dynamic "17.6Dynamic memory management") | Dynamic memory management | <new> |
| [🔗](#tab:headers.cpp.fs-row-8)<br>[[support.rtti]](support.rtti "17.7Type identification") | Type identification | <typeinfo> |
| [🔗](#tab:headers.cpp.fs-row-9)<br>[[support.srcloc]](support.srcloc "17.8Source location") | Source location | <source_location> |
| [🔗](#tab:headers.cpp.fs-row-10)<br>[[support.exception]](support.exception "17.9Exception handling") | Exception handling | <exception> |
| [🔗](#tab:headers.cpp.fs-row-11)<br>[[support.initlist]](support.initlist "17.11Initializer lists") | Initializer lists | <initializer_list> |
| [🔗](#tab:headers.cpp.fs-row-12)<br>[[cmp]](cmp "17.12Comparisons") | Comparisons | <compare> |
| [🔗](#tab:headers.cpp.fs-row-13)<br>[[support.contract]](support.contract "17.10Contract-violation handling") | Contract-violation handling | <contracts> |
| [🔗](#tab:headers.cpp.fs-row-14)<br>[[support.coroutine]](support.coroutine "17.13Coroutines") | Coroutines support | <coroutine> |
| [🔗](#tab:headers.cpp.fs-row-15)<br>[[support.runtime]](support.runtime "17.14Other runtime support") | Other runtime support | <cstdarg> |
| [🔗](#tab:headers.cpp.fs-row-16)<br>[[concepts]](concepts "18Concepts library") | Concepts library | <concepts> |
| [🔗](#tab:headers.cpp.fs-row-17)<br>[[errno]](errno "19.4Error numbers") | Error numbers | <cerrno> |
| [🔗](#tab:headers.cpp.fs-row-18)<br>[[syserr]](syserr "19.5System error support") | System error support | <system_error> |
| [🔗](#tab:headers.cpp.fs-row-19)<br>[[debugging]](debugging "19.7Debugging") | Debugging | <debugging> |
| [🔗](#tab:headers.cpp.fs-row-20)<br>[[memory]](memory "20.2Memory") | Memory | <memory> |
| [🔗](#tab:headers.cpp.fs-row-21)<br>[[type.traits]](type.traits "21.3Metaprogramming and type traits") | Type traits | <type_traits> |
| [🔗](#tab:headers.cpp.fs-row-22)<br>[[ratio]](ratio "21.5Compile-time rational arithmetic") | Compile-time rational arithmetic | <ratio> |
| [🔗](#tab:headers.cpp.fs-row-23)<br>[[utility]](utility "22.2Utility components") | Utility components | <utility> |
| [🔗](#tab:headers.cpp.fs-row-24)<br>[[tuple]](tuple "22.4Tuples") | Tuples | <tuple> |
| [🔗](#tab:headers.cpp.fs-row-25)<br>[[optional]](optional "22.5Optional objects") | Optional objects | <optional> |
| [🔗](#tab:headers.cpp.fs-row-26)<br>[[variant]](variant "22.6Variants") | Variants | <variant> |
| [🔗](#tab:headers.cpp.fs-row-27)<br>[[expected]](expected "22.8Expected objects") | Expected objects | <expected> |
| [🔗](#tab:headers.cpp.fs-row-28)<br>[[function.objects]](function.objects "22.10Function objects") | Function objects | <functional> |
| [🔗](#tab:headers.cpp.fs-row-29)<br>[[bit]](bit "22.11Bit manipulation") | Bit manipulation | <bit> |
| [🔗](#tab:headers.cpp.fs-row-30)<br>[[stdbit.h.syn]](stdbit.h.syn "22.12Header <stdbit.h> synopsis") | C-compatible bit manipulation | <stdbit.h> |
| [🔗](#tab:headers.cpp.fs-row-31)<br>[[array]](array "23.3.3Class template array") | Class template array | <array> |
| [🔗](#tab:headers.cpp.fs-row-32)<br>[[inplace.vector]](inplace.vector "23.3.16Class template inplace_­vector") | Class template inplace_vector | <inplace_vector> |
| [🔗](#tab:headers.cpp.fs-row-33)<br>[[views.contiguous]](views.contiguous "23.7.2Contiguous access") | Contiguous access | <span> |
| [🔗](#tab:headers.cpp.fs-row-34)<br>[[views.multidim]](views.multidim "23.7.3Multidimensional access") | Multidimensional access | <mdspan> |
| [🔗](#tab:headers.cpp.fs-row-35)<br>[[iterators]](iterators "24Iterators library") | Iterators library | <iterator> |
| [🔗](#tab:headers.cpp.fs-row-36)<br>[[ranges]](ranges "25Ranges library") | Ranges library | <ranges> |
| [🔗](#tab:headers.cpp.fs-row-37)<br>[[algorithms]](algorithms "26Algorithms library") | Algorithms library | <algorithm>, <numeric> |
| [🔗](#tab:headers.cpp.fs-row-38)<br>[[execpol]](execpol "26.3.6Execution policies") | Execution policies | <execution> |
| [🔗](#tab:headers.cpp.fs-row-39)<br>[[string.view]](string.view "27.3String view classes") | String view classes | <string_view> |
| [🔗](#tab:headers.cpp.fs-row-40)<br>[[string.classes]](string.classes "27.4String classes") | String classes | <string> |
| [🔗](#tab:headers.cpp.fs-row-41)<br>[[c.strings]](c.strings "27.5Null-terminated sequence utilities") | Null-terminated sequence utilities | <cstring>, <cwchar> |
| [🔗](#tab:headers.cpp.fs-row-42)<br>[[charconv]](charconv "28.2Primitive numeric conversions") | Primitive numeric conversions | <charconv> |
| [🔗](#tab:headers.cpp.fs-row-43)<br>[[rand]](rand "29.5Random number generation") | Random number generation | <random> |
| [🔗](#tab:headers.cpp.fs-row-44)<br>[[c.math]](c.math "29.7Mathematical functions for floating-point types") | Mathematical functions for floating-point types | <cmath> |
| [🔗](#tab:headers.cpp.fs-row-45)<br>[[atomics]](atomics "32.5Atomic operations") | Atomics | <atomic> |
| [🔗](#tab:headers.cpp.fs-row-46) |
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1641)
For each of the headers listed in Table [27](#tab:headers.cpp.fs "Table 27: C++ headers for freestanding implementations"),
a freestanding implementation provides at least
the freestanding items ([[freestanding.item]](freestanding.item "16.3.3.7Freestanding items")) declared in the header[.](#3.sentence-1)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1646)
The [*hosted library facilities*](#def:library_facilities,hosted "16.4.2.5Freestanding implementations[compliance]") are
the set of facilities described in this document
that are required for hosted implementations,
but not required for freestanding implementations[.](#4.sentence-1)
A freestanding implementation provides
a (possibly empty) implementation-defined subset of
the hosted library facilities[.](#4.sentence-2)
Unless otherwise specified, the requirements on
each declaration, entity, [*typedef-name*](dcl.typedef#nt:typedef-name "9.2.4The typedef specifier[dcl.typedef]"), and macro
provided in this way are the same as
the corresponding requirements for a hosted implementation,
except that not all of the members of the namespaces are required to be present[.](#4.sentence-3)
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L1660)
A freestanding implementation provides
deleted definitions ([[dcl.fct.def.delete]](dcl.fct.def.delete "9.6.3Deleted definitions")) for
a (possibly empty) implementation-defined subset of
the namespace-scope functions and function templates
from the hosted library facilities[.](#5.sentence-1)
[*Note [1](#note-1)*:
An implementation can provide a deleted definition
so that the result of overload resolution does not silently change
when migrating a program from a freestanding implementation to
a hosted implementation[.](#5.sentence-2)
— *end note*]