From Jason Turner

[headers]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpbcgmxevh/{from.md → to.md} +78 -30
tmp/tmpbcgmxevh/{from.md → to.md} RENAMED
@@ -1,32 +1,37 @@
1
  #### Headers <a id="headers">[[headers]]</a>
2
 
3
  Each element of the C++standard library is declared or defined (as
4
- appropriate) in a *header*.[^16]
5
 
6
- The C++standard library provides 53 *C++library headers*, as shown in
7
  Table  [[tab:cpp.library.headers]].
8
 
9
  **Table: C++library headers** <a id="tab:cpp.library.headers">[tab:cpp.library.headers]</a>
10
 
11
- | | | | | |
12
- | ---------------------- | -------------------- | ----------- | -------------------- | ----------------- |
13
- | `<algorithm>` | `<fstream>` | `<list>` | `<regex>` | `<tuple>` |
14
- | `<array>` | `<functional>` | `<locale>` | `<scoped_allocator>` | `<type_traits>` |
15
- | `<atomic>` | `<future>` | `<map>` | `<set>` | `<typeindex>` |
16
- | `<bitset>` | `<initializer_list>` | `<memory>` | `<sstream>` | `<typeinfo>` |
17
- | `<chrono>` | `<iomanip>` | `<mutex>` | `<stack>` | `<unordered_map>` |
18
- | `<codecvt>` | `<ios>` | `<new>` | `<stdexcept>` | `<unordered_set>` |
19
- | `<complex>` | `<iosfwd>` | `<numeric>` | `<streambuf>` | `<utility>` |
20
- | `<condition_variable>` | `<iostream>` | `<ostream>` | `<string>` | `<valarray>` |
21
- | `<deque>` | `<istream>` | `<queue>` | `<strstream>` | `<vector>` |
22
- | `<exception>` | `<iterator>` | `<random>` | `<system_error>` | |
23
- | `<forward_list>` | `<limits>` | `<ratio>` | `<thread>` | |
 
 
 
 
 
24
 
25
 
26
- The facilities of the C standard Library are provided in 26 additional
27
- headers, as shown in Table  [[tab:cpp.c.headers]].
28
 
29
  **Table: C++headers for C library facilities** <a id="tab:cpp.c.headers">[tab:cpp.c.headers]</a>
30
 
31
  | | | | | |
32
  | ------------ | ------------- | ------------- | ----------- | ----------- |
@@ -36,30 +41,73 @@ headers, as shown in Table  [[tab:cpp.c.headers]].
36
  | `<cerrno>` | `<clocale>` | `<cstdbool>` | `<ctgmath>` | |
37
  | `<cfenv>` | `<cmath>` | `<cstddef>` | `<ctime>` | |
38
  | `<cfloat>` | `<csetjmp>` | `<cstdint>` | `<cuchar>` | |
39
 
40
 
41
- Except as noted in Clauses  [[language.support]] through  [[thread]] and
42
- Annex  [[depr]], the contents of each header `cname` shall be the same
43
- as that of the corresponding header `name.h`, as specified in the C
44
- standard library ([[intro.refs]]) or the C Unicode TR, as appropriate,
45
- as if by inclusion. In the C++standard library, however, the
46
  declarations (except for names which are defined as macros in C) are
47
  within namespace scope ([[basic.scope.namespace]]) of the namespace
48
- `std.` It is unspecified whether these names are first declared within
49
- the global namespace scope and are then injected into namespace `std` by
50
- explicit *using-declaration*s ([[namespace.udecl]]).
 
 
51
 
52
  Names which are defined as macros in C shall be defined as macros in the
53
  C++ standard library, even if C grants license for implementation as
54
- functions. The names defined as macros in C include the following:
55
- `assert`, `offsetof`, `setjmp`, `va_arg`, `va_end`, and `va_start`.
 
 
 
56
 
57
  Names that are defined as functions in C shall be defined as functions
58
- in the C++standard library.[^17]
59
 
60
  Identifiers that are keywords or operators in C++shall not be defined as
61
- macros in C++standard library headers.[^18]
62
 
63
  [[depr.c.headers]], C standard library headers, describes the effects of
64
- using the `name.h` (C header) form in a C++program.[^19]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
 
1
  #### Headers <a id="headers">[[headers]]</a>
2
 
3
  Each element of the C++standard library is declared or defined (as
4
+ appropriate) in a *header*.[^14]
5
 
6
+ The C++standard library provides the *C++library headers*, shown in
7
  Table  [[tab:cpp.library.headers]].
8
 
9
  **Table: C++library headers** <a id="tab:cpp.library.headers">[tab:cpp.library.headers]</a>
10
 
11
+ | | | | |
12
+ | ---------------------- | -------------------- | -------------------- | ----------------- |
13
+ | `<algorithm>` | `<future>` | `<numeric>` | `<strstream>` |
14
+ | `<any>` | `<initializer_list>` | `<optional>` | `<system_error>` |
15
+ | `<array>` | `<iomanip>` | `<ostream>` | `<thread>` |
16
+ | `<atomic>` | `<ios>` | `<queue>` | `<tuple>` |
17
+ | `<bitset>` | `<iosfwd>` | `<random>` | `<type_traits>` |
18
+ | `<chrono>` | `<iostream>` | `<ratio>` | `<typeindex>` |
19
+ | `<codecvt>` | `<istream>` | `<regex>` | `<typeinfo>` |
20
+ | `<complex>` | `<iterator>` | `<scoped_allocator>` | `<unordered_map>` |
21
+ | `<condition_variable>` | `<limits>` | `<set>` | `<unordered_set>` |
22
+ | `<deque>` | `<list>` | `<shared_mutex>` | `<utility>` |
23
+ | `<exception>` | `<locale>` | `<sstream>` | `<valarray>` |
24
+ | `<execution>` | `<map>` | `<stack>` | `<variant>` |
25
+ | `<filesystem>` | `<memory>` | `<stdexcept>` | `<vector>` |
26
+ | `<forward_list>` | `<memory_resource>` | `<streambuf>` | |
27
+ | `<fstream>` | `<mutex>` | `<string>` | |
28
+ | `<functional>` | `<new>` | `<string_view>` | |
29
 
30
 
31
+ The facilities of the C standard library are provided in the additional
32
+ headers shown in Table  [[tab:cpp.c.headers]]. [^15]
33
 
34
  **Table: C++headers for C library facilities** <a id="tab:cpp.c.headers">[tab:cpp.c.headers]</a>
35
 
36
  | | | | | |
37
  | ------------ | ------------- | ------------- | ----------- | ----------- |
 
41
  | `<cerrno>` | `<clocale>` | `<cstdbool>` | `<ctgmath>` | |
42
  | `<cfenv>` | `<cmath>` | `<cstddef>` | `<ctime>` | |
43
  | `<cfloat>` | `<csetjmp>` | `<cstdint>` | `<cuchar>` | |
44
 
45
 
46
+ Except as noted in Clauses  [[library]] through  [[thread]] and Annex 
47
+ [[depr]], the contents of each header `cname` is the same as that of the
48
+ corresponding header `name.h` as specified in the C standard library
49
+ (Clause  [[intro.refs]]). In the C++standard library, however, the
 
50
  declarations (except for names which are defined as macros in C) are
51
  within namespace scope ([[basic.scope.namespace]]) of the namespace
52
+ `std`. It is unspecified whether these names (including any overloads
53
+ added in Clauses  [[language.support]] through  [[thread]] and Annex 
54
+ [[depr]]) are first declared within the global namespace scope and are
55
+ then injected into namespace `std` by explicit *using-declaration*s (
56
+ [[namespace.udecl]]).
57
 
58
  Names which are defined as macros in C shall be defined as macros in the
59
  C++ standard library, even if C grants license for implementation as
60
+ functions.
61
+
62
+ [*Note 1*: The names defined as macros in C include the following:
63
+ `assert`, `offsetof`, `setjmp`, `va_arg`, `va_end`, and
64
+ `va_start`. — *end note*]
65
 
66
  Names that are defined as functions in C shall be defined as functions
67
+ in the C++standard library.[^16]
68
 
69
  Identifiers that are keywords or operators in C++shall not be defined as
70
+ macros in C++standard library headers.[^17]
71
 
72
  [[depr.c.headers]], C standard library headers, describes the effects of
73
+ using the `name.h` (C header) form in a C++program.[^18]
74
+
75
+ Annex K of the C standard describes a large number of functions, with
76
+ associated types and macros, which “promote safer, more secure
77
+ programming” than many of the traditional C library functions. The names
78
+ of the functions have a suffix of `_s`; most of them provide the same
79
+ service as the C library function with the unsuffixed name, but
80
+ generally take an additional argument whose value is the size of the
81
+ result array. If any C++header is included, it is
82
+ *implementation-defined* whether any of these names is declared in the
83
+ global namespace. (None of them is declared in namespace `std`.)
84
+
85
+ Table  [[tab:c.annex.k.names]] lists the Annex K names that may be
86
+ declared in some header. These names are also subject to the
87
+ restrictions of  [[macro.names]].
88
+
89
+ **Table: C standard Annex K names** <a id="tab:c.annex.k.names">[tab:c.annex.k.names]</a>
90
+
91
+ | | | | |
92
+ | ---------------------- | -------------------------- | -------------- | ------------- |
93
+ | `abort_handler_s` | `mbstowcs_s` | `strncat_s` | `vswscanf_s` |
94
+ | `asctime_s` | `memcpy_s` | `strncpy_s` | `vwprintf_s` |
95
+ | `bsearch_s` | `memmove_s` | `strtok_s` | `vwscanf_s` |
96
+ | `constraint_handler_t` | `memset_s` | `swprintf_s` | `wcrtomb_s` |
97
+ | `ctime_s` | `printf_s` | `swscanf_s` | `wcscat_s` |
98
+ | `errno_t` | `qsort_s` | `tmpfile_s` | `wcscpy_s` |
99
+ | `fopen_s` | `RSIZE_MAX` | `TMP_MAX_S` | `wcsncat_s` |
100
+ | `fprintf_s` | `rsize_t` | `tmpnam_s` | `wcsncpy_s` |
101
+ | `freopen_s` | `scanf_s` | `vfprintf_s` | `wcsnlen_s` |
102
+ | `fscanf_s` | `set_constraint_handler_s` | `vfscanf_s` | `wcsrtombs_s` |
103
+ | `fwprintf_s` | `snprintf_s` | `vfwprintf_s` | `wcstok_s` |
104
+ | `fwscanf_s` | `snwprintf_s` | `vfwscanf_s` | `wcstombs_s` |
105
+ | `getenv_s` | `sprintf_s` | `vprintf_s` | `wctomb_s` |
106
+ | `gets_s` | `sscanf_s` | `vscanf_s` | `wmemcpy_s` |
107
+ | `gmtime_s` | `strcat_s` | `vsnprintf_s` | `wmemmove_s` |
108
+ | `ignore_handler_s` | `strcpy_s` | `vsnwprintf_s` | `wprintf_s` |
109
+ | `L_tmpnam_s` | `strerror_s` | `vsprintf_s` | `wscanf_s` |
110
+ | `localtime_s` | `strerrorlen_s` | `vsscanf_s` | |
111
+ | `mbsrtowcs_s` | `strlen_s` | `vswprintf_s` | |
112
+
113