9.2 KiB
[compliance]
16 Library introduction [library]
16.4 Library-wide requirements [requirements]
16.4.2 Library contents and organization [organization]
16.4.2.5 Freestanding implementations [compliance]
Two kinds of implementations are defined:hosted and freestanding ([intro.compliance]); the kind of the implementation isimplementation-defined.
For a hosted implementation, this document describes the set of available headers.
A freestanding implementation has animplementation-defined set of headers.
This set shall include at least the headers shown in Table 27.
Table 27 — C++ headers for freestanding implementations [tab:headers.cpp.fs]
| ð | Subclause | Header |
|---|---|---|
| ð [support.types] |
Common definitions | |
| ð [cstdlib.syn] |
C standard library | |
| ð [support.limits] |
Implementation properties | , , , |
| ð | ||
| ð [cstdint.syn] |
Integer types | |
| ð [support.dynamic] |
Dynamic memory management | |
| ð [support.rtti] |
Type identification | |
| ð [support.srcloc] |
Source location | <source_location> |
| ð [support.exception] |
Exception handling | |
| ð [support.initlist] |
Initializer lists | <initializer_list> |
| ð [cmp] |
Comparisons | |
| ð [support.contract] |
Contract-violation handling | |
| ð [support.coroutine] |
Coroutines support | |
| ð [support.runtime] |
Other runtime support | |
| ð [concepts] |
Concepts library | |
| ð [errno] |
Error numbers | |
| ð [syserr] |
System error support | <system_error> |
| ð [debugging] |
Debugging | |
| ð [memory] |
Memory | |
| ð [type.traits] |
Type traits | <type_traits> |
| ð [ratio] |
Compile-time rational arithmetic | |
| ð [utility] |
Utility components | |
| ð [tuple] |
Tuples | |
| ð [optional] |
Optional objects | |
| ð [variant] |
Variants | |
| ð [expected] |
Expected objects | |
| ð [function.objects] |
Function objects | |
| ð [bit] |
Bit manipulation | |
| ð [stdbit.h.syn] |
C-compatible bit manipulation | <stdbit.h> |
| ð [array] |
Class template array | |
| ð [inplace.vector] |
Class template inplace_vector | <inplace_vector> |
| ð [views.contiguous] |
Contiguous access | |
| ð [views.multidim] |
Multidimensional access | |
| ð [iterators] |
Iterators library | |
| ð [ranges] |
Ranges library | |
| ð [algorithms] |
Algorithms library | , |
| ð [execpol] |
Execution policies | |
| ð [string.view] |
String view classes | <string_view> |
| ð [string.classes] |
String classes | |
| ð [c.strings] |
Null-terminated sequence utilities | , |
| ð [charconv] |
Primitive numeric conversions | |
| ð [rand] |
Random number generation | |
| ð [c.math] |
Mathematical functions for floating-point types | |
| ð [atomics] |
Atomics | |
| ð |
For each of the headers listed in Table 27, a freestanding implementation provides at least the freestanding items ([freestanding.item]) declared in the header.
The hosted library facilities are the set of facilities described in this document that are required for hosted implementations, but not required for freestanding implementations.
A freestanding implementation provides a (possibly empty) implementation-defined subset of the hosted library facilities.
Unless otherwise specified, the requirements on each declaration, entity, typedef-name, 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.
A freestanding implementation provides deleted definitions ([dcl.fct.def.delete]) for a (possibly empty) implementation-defined subset of the namespace-scope functions and function templates from the hosted library facilities.
[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.
â end note]