Files
cppdraft_translate/cppdraft/compliance.md
2025-10-25 03:02:53 +03:00

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]

1

#

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.

2

#

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
🔗

3

#

For each of the headers listed in Table 27, a freestanding implementation provides at least the freestanding items ([freestanding.item]) declared in the header.

4

#

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.

5

#

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]