[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.1 Implementation 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.2 Common definitions") | Common definitions | <cstddef> |
| [ð](#tab:headers.cpp.fs-row-3)<br>[[cstdlib.syn]](cstdlib.syn "17.2.2 Header <cstdlib> synopsis") | C standard library | <cstdlib> |
| [ð](#tab:headers.cpp.fs-row-4)<br>[[support.limits]](support.limits "17.3 Implementation 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.1 Header <cstdint> synopsis") | Integer types | <cstdint> |
| [ð](#tab:headers.cpp.fs-row-7)<br>[[support.dynamic]](support.dynamic "17.6 Dynamic memory management") | Dynamic memory management | <new> |
| [ð](#tab:headers.cpp.fs-row-8)<br>[[support.rtti]](support.rtti "17.7 Type identification") | Type identification | <typeinfo> |
| [ð](#tab:headers.cpp.fs-row-9)<br>[[support.srcloc]](support.srcloc "17.8 Source location") | Source location | <source_location> |
| [ð](#tab:headers.cpp.fs-row-10)<br>[[support.exception]](support.exception "17.9 Exception handling") | Exception handling | <exception> |
| [ð](#tab:headers.cpp.fs-row-11)<br>[[support.initlist]](support.initlist "17.11 Initializer lists") | Initializer lists | <initializer_list> |
| [ð](#tab:headers.cpp.fs-row-12)<br>[[cmp]](cmp "17.12 Comparisons") | Comparisons | <compare> |
| [ð](#tab:headers.cpp.fs-row-13)<br>[[support.contract]](support.contract "17.10 Contract-violation handling") | Contract-violation handling | <contracts> |
| [ð](#tab:headers.cpp.fs-row-14)<br>[[support.coroutine]](support.coroutine "17.13 Coroutines") | Coroutines support | <coroutine> |
| [ð](#tab:headers.cpp.fs-row-15)<br>[[support.runtime]](support.runtime "17.14 Other runtime support") | Other runtime support | <cstdarg> |
| [ð](#tab:headers.cpp.fs-row-16)<br>[[concepts]](concepts "18 Concepts library") | Concepts library | <concepts> |
| [ð](#tab:headers.cpp.fs-row-17)<br>[[errno]](errno "19.4 Error numbers") | Error numbers | <cerrno> |
| [ð](#tab:headers.cpp.fs-row-18)<br>[[syserr]](syserr "19.5 System error support") | System error support | <system_error> |
| [ð](#tab:headers.cpp.fs-row-19)<br>[[debugging]](debugging "19.7 Debugging") | Debugging | <debugging> |
| [ð](#tab:headers.cpp.fs-row-20)<br>[[memory]](memory "20.2 Memory") | Memory | <memory> |
| [ð](#tab:headers.cpp.fs-row-21)<br>[[type.traits]](type.traits "21.3 Metaprogramming and type traits") | Type traits | <type_traits> |
| [ð](#tab:headers.cpp.fs-row-22)<br>[[ratio]](ratio "21.5 Compile-time rational arithmetic") | Compile-time rational arithmetic | <ratio> |
| [ð](#tab:headers.cpp.fs-row-23)<br>[[utility]](utility "22.2 Utility components") | Utility components | <utility> |
| [ð](#tab:headers.cpp.fs-row-24)<br>[[tuple]](tuple "22.4 Tuples") | Tuples | <tuple> |
| [ð](#tab:headers.cpp.fs-row-25)<br>[[optional]](optional "22.5 Optional objects") | Optional objects | <optional> |
| [ð](#tab:headers.cpp.fs-row-26)<br>[[variant]](variant "22.6 Variants") | Variants | <variant> |
| [ð](#tab:headers.cpp.fs-row-27)<br>[[expected]](expected "22.8 Expected objects") | Expected objects | <expected> |
| [ð](#tab:headers.cpp.fs-row-28)<br>[[function.objects]](function.objects "22.10 Function objects") | Function objects | <functional> |
| [ð](#tab:headers.cpp.fs-row-29)<br>[[bit]](bit "22.11 Bit manipulation") | Bit manipulation | <bit> |
| [ð](#tab:headers.cpp.fs-row-30)<br>[[stdbit.h.syn]](stdbit.h.syn "22.12 Header <stdbit.h> synopsis") | C-compatible bit manipulation | <stdbit.h> |
| [ð](#tab:headers.cpp.fs-row-31)<br>[[array]](array "23.3.3 Class template array") | Class template array | <array> |
| [ð](#tab:headers.cpp.fs-row-32)<br>[[inplace.vector]](inplace.vector "23.3.16 Class template inplace_­vector") | Class template inplace_vector | <inplace_vector> |
| [ð](#tab:headers.cpp.fs-row-33)<br>[[views.contiguous]](views.contiguous "23.7.2 Contiguous access") | Contiguous access | <span> |
| [ð](#tab:headers.cpp.fs-row-34)<br>[[views.multidim]](views.multidim "23.7.3 Multidimensional access") | Multidimensional access | <mdspan> |
| [ð](#tab:headers.cpp.fs-row-35)<br>[[iterators]](iterators "24 Iterators library") | Iterators library | <iterator> |
| [ð](#tab:headers.cpp.fs-row-36)<br>[[ranges]](ranges "25 Ranges library") | Ranges library | <ranges> |
| [ð](#tab:headers.cpp.fs-row-37)<br>[[algorithms]](algorithms "26 Algorithms library") | Algorithms library | <algorithm>, <numeric> |
| [ð](#tab:headers.cpp.fs-row-38)<br>[[execpol]](execpol "26.3.6 Execution policies") | Execution policies | <execution> |
| [ð](#tab:headers.cpp.fs-row-39)<br>[[string.view]](string.view "27.3 String view classes") | String view classes | <string_view> |
| [ð](#tab:headers.cpp.fs-row-40)<br>[[string.classes]](string.classes "27.4 String classes") | String classes | <string> |
| [ð](#tab:headers.cpp.fs-row-41)<br>[[c.strings]](c.strings "27.5 Null-terminated sequence utilities") | Null-terminated sequence utilities | <cstring>, <cwchar> |
| [ð](#tab:headers.cpp.fs-row-42)<br>[[charconv]](charconv "28.2 Primitive numeric conversions") | Primitive numeric conversions | <charconv> |
| [ð](#tab:headers.cpp.fs-row-43)<br>[[rand]](rand "29.5 Random number generation") | Random number generation | <random> |
| [ð](#tab:headers.cpp.fs-row-44)<br>[[c.math]](c.math "29.7 Mathematical functions for floating-point types") | Mathematical functions for floating-point types | <cmath> |
| [ð](#tab:headers.cpp.fs-row-45)<br>[[atomics]](atomics "32.5 Atomic 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.7 Freestanding 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.5 Freestanding 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.4 The 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.3 Deleted 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*]
