Init
This commit is contained in:
61
cppdraft/library/c.md
Normal file
61
cppdraft/library/c.md
Normal file
@@ -0,0 +1,61 @@
|
||||
[library.c]
|
||||
|
||||
# 16 Library introduction [[library]](./#library)
|
||||
|
||||
## 16.2 The C standard library [library.c]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L136)
|
||||
|
||||
The C++ standard library also makes available the facilities of the C standard library,suitably adjusted to ensure static type safety[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L141)
|
||||
|
||||
The descriptions of many library functions rely on the C standard library for
|
||||
the semantics of those functions[.](#2.sentence-1)
|
||||
|
||||
In some cases,
|
||||
the signatures specified in this document
|
||||
may be different from the signatures in the C standard library,
|
||||
and additional overloads may be declared in this document,
|
||||
but the behavior and the preconditions
|
||||
(including any preconditions implied by the use of
|
||||
a C restrict qualifier)
|
||||
are the same unless otherwise stated[.](#2.sentence-2)
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L153)
|
||||
|
||||
A call to a C standard library function is
|
||||
a non-constant library call ([[defns.nonconst.libcall]](defns.nonconst.libcall "3.35 non-constant library call"))
|
||||
if it raises a floating-point exception other than FE_INEXACT[.](#3.sentence-1)
|
||||
|
||||
The semantics of a call to a C standard library function
|
||||
evaluated as a core constant expression
|
||||
are those specified in ISO/IEC 9899:2024, Annex F[131](#footnote-131 "See also ISO/IEC 9899:2024, 7.6.") to the extent applicable to the floating-point types ([[basic.fundamental]](basic.fundamental "6.9.2 Fundamental types"))
|
||||
that are parameter types of the called function[.](#3.sentence-2)
|
||||
|
||||
[*Note [1](#note-1)*:
|
||||
|
||||
ISO/IEC 9899:2024, Annex F specifies
|
||||
the conditions under which floating-point exceptions are raised and
|
||||
the behavior when NaNs and/or infinities are passed as arguments[.](#3.sentence-3)
|
||||
|
||||
â *end note*]
|
||||
|
||||
[*Note [2](#note-2)*:
|
||||
|
||||
Equivalently, a call to a C standard library function is
|
||||
a non-constant library call
|
||||
if errno is set
|
||||
when math_errhandling & MATH_ERRNO is true[.](#3.sentence-4)
|
||||
|
||||
â *end note*]
|
||||
|
||||
[131)](#footnote-131)[131)](#footnoteref-131)
|
||||
|
||||
See also ISO/IEC 9899:2024, 7.6[.](#footnote-131.sentence-1)
|
||||
34
cppdraft/library/class/props.md
Normal file
34
cppdraft/library/class/props.md
Normal file
@@ -0,0 +1,34 @@
|
||||
[library.class.props]
|
||||
|
||||
# 16 Library introduction [[library]](./#library)
|
||||
|
||||
## 16.4 Library-wide requirements [[requirements]](requirements#library.class.props)
|
||||
|
||||
### 16.4.6 Conforming implementations [[conforming]](conforming#library.class.props)
|
||||
|
||||
#### 16.4.6.11 Properties of library classes [library.class.props]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L3825)
|
||||
|
||||
Unless explicitly stated otherwise, it is unspecified whether any class
|
||||
described in [[support]](support "17 Language support library") through [[exec]](exec "33 Execution control library") and[[depr]](depr "Annex D (normative) Compatibility features") is a trivially copyable class, a standard-layout class, or an
|
||||
implicit-lifetime class ([[class.prop]](class.prop "11.2 Properties of classes"))[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L3831)
|
||||
|
||||
Unless explicitly stated otherwise, it is unspecified whether any class for
|
||||
which trivial relocation (i.e., the effects oftrivially_relocate ([[obj.lifetime]](obj.lifetime "20.2.6 Explicit lifetime management"))) would be semantically equivalent
|
||||
to move-construction of the destination object followed by destruction of the
|
||||
source object is a trivially relocatable class ([[class.prop]](class.prop "11.2 Properties of classes"))[.](#2.sentence-1)
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L3838)
|
||||
|
||||
Unless explicitly stated otherwise, it is unspecified whether a class C is a replaceable class ([[class.prop]](class.prop "11.2 Properties of classes")) if assigning an xvalue a of
|
||||
type C to an object b of type C is semantically
|
||||
equivalent to destroying b and then constructing from a inb's place[.](#3.sentence-1)
|
||||
183
cppdraft/library/general.md
Normal file
183
cppdraft/library/general.md
Normal file
@@ -0,0 +1,183 @@
|
||||
[library.general]
|
||||
|
||||
# 16 Library introduction [[library]](./#library)
|
||||
|
||||
## 16.1 General [library.general]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L6)
|
||||
|
||||
This Clause describes the contents of the[*C++ standard library*](#def:library,C++_standard "16.1 General [library.general]"),
|
||||
how a well-formed C++ program makes use of the library, and
|
||||
how a conforming implementation may provide the entities in the library[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L12)
|
||||
|
||||
The following subclauses describe the method of
|
||||
description ([[description]](description "16.3 Method of description")) and organization ([[organization]](organization "16.4.2 Library contents and organization")) of the
|
||||
library[.](#2.sentence-1)
|
||||
|
||||
[[requirements]](requirements "16.4 Library-wide requirements"), [[support]](support "17 Language support library") through [[exec]](exec "33 Execution control library"), and [[depr]](depr "Annex D (normative) Compatibility features") specify the contents of the
|
||||
library, as well as library requirements and constraints on both well-formed
|
||||
C++ programs and conforming implementations[.](#2.sentence-2)
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L20)
|
||||
|
||||
Detailed specifications for each of the components in the library are in[[support]](support "17 Language support library")â[[exec]](exec "33 Execution control library"), as shown in
|
||||
Table [23](#tab:library.categories "Table 23: Library categories")[.](#3.sentence-1)
|
||||
|
||||
Table [23](#tab:library.categories) — Library categories [[tab:library.categories]](./tab:library.categories)
|
||||
|
||||
| [ð](#tab:library.categories-row-1)<br>**Clause** | **Category** |
|
||||
| --- | --- |
|
||||
| [ð](#tab:library.categories-row-2)<br>[[support]](support "17 Language support library") | Language support library |
|
||||
| [ð](#tab:library.categories-row-3)<br>[[concepts]](concepts "18 Concepts library") | Concepts library |
|
||||
| [ð](#tab:library.categories-row-4)<br>[[diagnostics]](diagnostics "19 Diagnostics library") | Diagnostics library |
|
||||
| [ð](#tab:library.categories-row-5)<br>[[mem]](mem "20 Memory management library") | Memory management library |
|
||||
| [ð](#tab:library.categories-row-6)<br>[[meta]](meta "21 Metaprogramming library") | Metaprogramming library |
|
||||
| [ð](#tab:library.categories-row-7)<br>[[utilities]](utilities "22 General utilities library") | General utilities library |
|
||||
| [ð](#tab:library.categories-row-8)<br>[[containers]](containers "23 Containers library") | Containers library |
|
||||
| [ð](#tab:library.categories-row-9)<br>[[iterators]](iterators "24 Iterators library") | Iterators library |
|
||||
| [ð](#tab:library.categories-row-10)<br>[[ranges]](ranges "25 Ranges library") | Ranges library |
|
||||
| [ð](#tab:library.categories-row-11)<br>[[algorithms]](algorithms "26 Algorithms library") | Algorithms library |
|
||||
| [ð](#tab:library.categories-row-12)<br>[[strings]](strings "27 Strings library") | Strings library |
|
||||
| [ð](#tab:library.categories-row-13)<br>[[text]](text "28 Text processing library") | Text processing library |
|
||||
| [ð](#tab:library.categories-row-14)<br>[[numerics]](numerics "29 Numerics library") | Numerics library |
|
||||
| [ð](#tab:library.categories-row-15)<br>[[time]](time "30 Time library") | Time library |
|
||||
| [ð](#tab:library.categories-row-16)<br>[[input.output]](input.output "31 Input/output library") | Input/output library |
|
||||
| [ð](#tab:library.categories-row-17)<br>[[thread]](thread "32 Concurrency support library") | Concurrency support library |
|
||||
| [ð](#tab:library.categories-row-18)<br>[[exec]](exec "33 Execution control library") | Execution control library |
|
||||
|
||||
[4](#4)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L48)
|
||||
|
||||
The operating system interface described in ISO/IEC/IEEE 9945:2009 is
|
||||
hereinafter called [*POSIX*](#def:POSIX "16.1 General [library.general]")[.](#4.sentence-1)
|
||||
|
||||
[5](#5)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L52)
|
||||
|
||||
The language support library ([[support]](support "17 Language support library")) provides components that are
|
||||
required by certain parts of the C++ language,
|
||||
such as memory allocation ([[expr.new]](expr.new "7.6.2.8 New"), [[expr.delete]](expr.delete "7.6.2.9 Delete")) and
|
||||
exception processing ([[except]](except "14 Exception handling"))[.](#5.sentence-1)
|
||||
|
||||
[6](#6)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L58)
|
||||
|
||||
The concepts library ([[concepts]](concepts "18 Concepts library")) describes library components that C++
|
||||
programs may use to perform compile-time validation of template arguments and
|
||||
perform function dispatch based on properties of types[.](#6.sentence-1)
|
||||
|
||||
[7](#7)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L63)
|
||||
|
||||
The diagnostics library ([[diagnostics]](diagnostics "19 Diagnostics library")) provides a consistent framework for
|
||||
reporting errors in a C++ program, including predefined exception classes[.](#7.sentence-1)
|
||||
|
||||
[8](#8)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L67)
|
||||
|
||||
The memory management library ([[mem]](mem "20 Memory management library")) provides components for
|
||||
memory management, including smart pointers and scoped allocators[.](#8.sentence-1)
|
||||
|
||||
[9](#9)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L71)
|
||||
|
||||
The metaprogramming library ([[meta]](meta "21 Metaprogramming library")) describes facilities
|
||||
for use in templates and during constant evaluation,
|
||||
including type traits, integer sequences, and rational arithmetic[.](#9.sentence-1)
|
||||
|
||||
[10](#10)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L76)
|
||||
|
||||
The general utilities library ([[utilities]](utilities "22 General utilities library")) includes components used
|
||||
by other library elements, such as a predefined storage allocator for dynamic
|
||||
storage management ([[basic.stc.dynamic]](basic.stc.dynamic "6.8.6.5 Dynamic storage duration")), and components used
|
||||
as infrastructure
|
||||
in C++ programs,
|
||||
such as tuples and function wrappers[.](#10.sentence-1)
|
||||
|
||||
[11](#11)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L84)
|
||||
|
||||
The containers ([[containers]](containers "23 Containers library")), iterators ([[iterators]](iterators "24 Iterators library")), ranges ([[ranges]](ranges "25 Ranges library")),
|
||||
and algorithms ([[algorithms]](algorithms "26 Algorithms library")) libraries provide a C++ program with access
|
||||
to a subset of the most widely used algorithms and data structures[.](#11.sentence-1)
|
||||
|
||||
[12](#12)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L89)
|
||||
|
||||
The strings library ([[strings]](strings "27 Strings library")) provides support
|
||||
for manipulating sequences of type char,
|
||||
sequences of type char8_t,
|
||||
sequences of type char16_t,
|
||||
sequences of type char32_t,
|
||||
sequences of type wchar_t,
|
||||
and sequences of any other character-like type[.](#12.sentence-1)
|
||||
|
||||
[13](#13)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L98)
|
||||
|
||||
The text processing library ([[text]](text "28 Text processing library")) provides support for text processing,
|
||||
including formatting, internationalization support and
|
||||
regular expression matching and searching[.](#13.sentence-1)
|
||||
|
||||
[14](#14)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L103)
|
||||
|
||||
The [numerics library](numerics "29 Numerics library [numerics]") provides
|
||||
numeric algorithms and complex number components that extend support for numeric processing[.](#14.sentence-1)
|
||||
|
||||
Thevalarray component provides support for*n*-at-a-time
|
||||
processing,
|
||||
potentially implemented as parallel operations on platforms that support such processing[.](#14.sentence-2)
|
||||
|
||||
The random number component provides facilities for generating pseudo-random numbers[.](#14.sentence-3)
|
||||
|
||||
[15](#15)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L114)
|
||||
|
||||
The time library ([[time]](time "30 Time library")) provides
|
||||
generally useful time utilities[.](#15.sentence-1)
|
||||
|
||||
[16](#16)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L118)
|
||||
|
||||
The input/output library ([[input.output]](input.output "31 Input/output library")) provides theiostream components that are the primary mechanism for C++ program input and output[.](#16.sentence-1)
|
||||
|
||||
They can be used with other elements of the library, particularly
|
||||
strings, locales, and iterators[.](#16.sentence-2)
|
||||
|
||||
[17](#17)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L125)
|
||||
|
||||
The concurrency support library ([[thread]](thread "32 Concurrency support library")) provides components to create
|
||||
and manage threads,
|
||||
including atomic operations, mutual exclusion, and interthread communication[.](#17.sentence-1)
|
||||
|
||||
[18](#18)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L130)
|
||||
|
||||
The execution control library ([[exec]](exec "33 Execution control library")) provides components
|
||||
supporting execution of function objects[.](#18.sentence-1)
|
||||
Reference in New Issue
Block a user