Skip to content

Commit 2144255

Browse files
committed
Move specification of deprecated headers to Annex D
1 parent 23b1faa commit 2144255

File tree

4 files changed

+91
-104
lines changed

4 files changed

+91
-104
lines changed

source/future.tex

+74-8
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@
5050

5151
\rSec1[depr.c.headers]{C standard library headers}
5252

53+
\pnum
54+
For compatibility with the C standard library\indextext{library!C standard},
55+
the \Cpp standard library provides headers
56+
\tcode{<ccomplex>}~(\ref{ccomplex.syn}),
57+
\tcode{<cstdalign>}~(\ref{cstdalign.syn}),
58+
\tcode{<cstdbool>}~(\ref{cstdbool.syn}),
59+
and \tcode{<ctgmath>}~(\ref{ctgmath.syn}).
60+
The use of these headers is deprecated.
61+
5362
\pnum
5463
For compatibility with the
5564
\indextext{library!C standard}%
@@ -94,14 +103,6 @@
94103

95104
\end{floattable}
96105

97-
\pnum
98-
The use of any of the \Cpp headers
99-
\tcode{<ccomplex>},
100-
\tcode{<cstdalign>},
101-
\tcode{<cstdbool>},
102-
or \tcode{<ctgmath>}
103-
is deprecated.
104-
105106
\pnum
106107
Except for the functions declared in \ref{sf.cmath}, every C header, each of
107108
which has a name of the form
@@ -134,6 +135,71 @@
134135
the namespace \tcode{std}.
135136
\end{example}
136137

138+
\rSec2[ccomplex.syn]{Header \tcode{<ccomplex>} synopsis}
139+
\indexlibrary{\idxhdr{ccomplex}}%
140+
141+
\begin{codeblock}
142+
#include <complex>
143+
\end{codeblock}
144+
145+
\pnum
146+
The header \tcode{<ccomplex>}
147+
behaves as if it simply includes the header
148+
\tcode{<complex>}~(\ref{complex.syn}).
149+
150+
\rSec2[cstdalign.syn]{Header \tcode{<cstdalign>} synopsis}
151+
152+
\indexlibrary{\idxcode{__alignas_is_defined}}%
153+
\indexlibrary{\idxhdr{cstdalign}}%
154+
\begin{codeblock}
155+
#define @\xname{alignas_is_defined}@ 1
156+
\end{codeblock}
157+
158+
\pnum
159+
\indexlibrary{\idxhdr{cstdalign}}%
160+
\indexlibrary{\idxhdr{stdalign.h}}%
161+
The contents of the header \tcode{<cstdalign>} are the same as the C
162+
standard library header \tcode{<stdalign.h>}, with the following changes:
163+
The header \tcode{<cstdalign>} and the header \tcode{<stdalign.h>} shall not
164+
define a macro named \tcode{alignas}.
165+
166+
\xref ISO C~7.15.
167+
168+
\rSec2[cstdbool.syn]{Header \tcode{<cstdbool>} synopsis}
169+
170+
\indexlibrary{\idxhdr{cstdbool}}%
171+
\indexlibrary{\idxcode{__bool_true_false_are_defined}}%
172+
\begin{codeblock}
173+
#define @\xname{bool_true_false_are_defined}@ 1
174+
\end{codeblock}
175+
176+
\pnum
177+
\indexlibrary{\idxhdr{stdbool.h}}%
178+
The contents of the header \tcode{<cstdbool>} are the same as the C
179+
standard library header \tcode{<stdbool.h>}, with the following changes:
180+
The header \tcode{<cstdbool>} and the header \tcode{<stdbool.h>} shall not
181+
define macros named \tcode{bool}, \tcode{true}, or \tcode{false}.
182+
183+
\xref ISO C~7.18.
184+
185+
\rSec2[ctgmath.syn]{Header \tcode{<ctgmath>} synopsis}
186+
187+
\indexlibrary{\idxhdr{ctgmath}}%
188+
\begin{codeblock}
189+
#include <complex>
190+
#include <cmath>
191+
\end{codeblock}
192+
193+
\pnum
194+
The header \tcode{<ctgmath>} simply includes the headers
195+
\tcode{<complex>}~(\ref{complex.syn})
196+
and \tcode{<cmath>}~(\ref{cmath.syn}).
197+
198+
\pnum
199+
\begin{note} The overloads provided in C by type-generic macros are already
200+
provided in \tcode{<complex>} and \tcode{<cmath>} by ``sufficient'' additional
201+
overloads.\end{note}
202+
137203
\rSec1[depr.str.strstreams]{\tcode{char*} streams}
138204

139205
\pnum

source/lib-intro.tex

+14-25
Original file line numberDiff line numberDiff line change
@@ -1057,55 +1057,44 @@
10571057

10581058

10591059
\pnum
1060-
The facilities of the C standard library are provided in 26
1061-
\indextext{library!C standard}%
1062-
additional headers, as shown in Table~\ref{tab:cpp.c.headers}.%
1060+
The facilities of the C standard library\indextext{library!C standard}
1061+
are provided in 22 additional headers, as shown in Table~\ref{tab:cpp.c.headers}.%
10631062
\footnote{It is intentional that there is no \Cpp header
10641063
for any of these C headers:
1065-
\indextext{\idxhdr{stdatomic.h}}%
1066-
\indextext{\idxhdr{stdnoreturn.h}}%
1067-
\indextext{\idxhdr{threads.h}}%
1068-
\tcode{<stdatomic.h>},
1069-
\tcode{<stdnoreturn.h>},
1070-
\tcode{<threads.h>}.}
1064+
\tcode{<stdatomic.h>}\indextext{\idxhdr{stdatomic.h}},
1065+
\tcode{<stdnoreturn.h>}\indextext{\idxhdr{stdnoreturn.h}},
1066+
\tcode{<threads.h>}\indextext{\idxhdr{threads.h}}.
1067+
See also \ref{depr.c.headers} and \ref{diff.mods.to.headers}.}
10711068

10721069
\begin{floattable}{\Cpp headers for C library facilities}{tab:cpp.c.headers}
10731070
{lllll}
10741071
\topline
1075-
10761072
\tcode{<cassert>} &
10771073
\tcode{<cinttypes>} &
10781074
\tcode{<csignal>} &
10791075
\tcode{<cstdio>} &
10801076
\tcode{<cwchar>} \\
10811077

1082-
\tcode{<ccomplex>} &
1078+
\tcode{<cctype>} &
10831079
\tcode{<ciso646>} &
1084-
\tcode{<cstdalign>} &
1080+
\tcode{<cstdarg>} &
10851081
\tcode{<cstdlib>} &
10861082
\tcode{<cwctype>} \\
10871083

1088-
\tcode{<cctype>} &
1084+
\tcode{<cerrno>} &
10891085
\tcode{<climits>} &
1090-
\tcode{<cstdarg>} &
1086+
\tcode{<cstddef>} &
10911087
\tcode{<cstring>} & \\
10921088

1093-
\tcode{<cerrno>} &
1094-
\tcode{<clocale>} &
1095-
\tcode{<cstdbool>} &
1096-
\tcode{<ctgmath>} & \\
1097-
10981089
\tcode{<cfenv>} &
1099-
\tcode{<cmath>} &
1100-
\tcode{<cstddef>} &
1090+
\tcode{<clocale>} &
1091+
\tcode{<cstdint>} &
11011092
\tcode{<ctime>} & \\
11021093

11031094
\tcode{<cfloat>} &
1095+
\tcode{<cmath>} &
11041096
\tcode{<csetjmp>} &
1105-
\tcode{<cstdint>} &
11061097
\tcode{<cuchar>} & \\
1107-
1108-
11091098
\end{floattable}
11101099

11111100
\pnum
@@ -1294,7 +1283,7 @@
12941283
\ref{support.rtti} & Type identification & \tcode{<typeinfo>} \\ \rowsep
12951284
\ref{support.exception} & Exception handling & \tcode{<exception>} \\ \rowsep
12961285
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
1297-
\ref{support.runtime} & Other runtime support & \tcode{<cstdalign>} \tcode{<cstdarg>} \tcode{<cstdbool>} \\ \rowsep
1286+
\ref{support.runtime} & Other runtime support & \tcode{<cstdarg>} \\ \rowsep
12981287
\ref{meta} & Type traits & \tcode{<type_traits>} \\ \rowsep
12991288
\ref{atomics} & Atomics & \tcode{<atomic>} \\
13001289
\end{libsumtab}

source/numerics.tex

+1-30
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
\ref{numarray} & Numeric arrays & \tcode{<valarray>} \\ \rowsep
2626
\ref{numeric.ops} & Generalized numeric operations & \tcode{<numeric>} \\ \rowsep
2727
\ref{c.math} & Mathematical functions for & \tcode{<cmath>} \\
28-
& floating point types & \tcode{<ctgmath>} \\
29-
& & \tcode{<cstdlib>} \\
28+
& floating point types & \tcode{<cstdlib>} \\
3029
\end{libsumtab}
3130

3231
\rSec1[numerics.defns]{Definitions}
@@ -1358,17 +1357,6 @@
13581357
\tcode{complex<float>\{0.0f, static_cast<float>(d)\}}.
13591358
\end{itemdescr}
13601359

1361-
\rSec2[ccomplex.syn]{Header \tcode{<ccomplex>} synopsis}
1362-
\indexlibrary{\idxhdr{ccomplex}}%
1363-
1364-
\begin{codeblock}
1365-
#include <complex>
1366-
\end{codeblock}
1367-
1368-
\pnum
1369-
The header \tcode{<ccomplex>}
1370-
behaves as if it simply includes the header \tcode{<complex>}.
1371-
13721360
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13731361
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13741362
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -11283,20 +11271,3 @@
1128311271
\end{itemdescr}
1128411272

1128511273
\indextext{mathematical special functions|)}
11286-
11287-
\rSec2[ctgmath.syn]{Header \tcode{<ctgmath>} synopsis}
11288-
11289-
\indexlibrary{\idxhdr{ctgmath}}%
11290-
\begin{codeblock}
11291-
#include <complex>
11292-
#include <cmath>
11293-
\end{codeblock}
11294-
11295-
\pnum
11296-
The header \tcode{<ctgmath>} simply includes the headers \tcode{<complex>}
11297-
and \tcode{<cmath>}.
11298-
11299-
\pnum
11300-
\begin{note} The overloads provided in C by type-generic macros are already
11301-
provided in \tcode{<complex>} and \tcode{<cmath>} by ``sufficient'' additional
11302-
overloads.\end{note}

source/support.tex

+2-41
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,15 @@
2626
& & \tcode{<limits>} \\
2727
\ref{support.limits} & Implementation properties & \tcode{<climits>} \\
2828
& & \tcode{<cfloat>} \\ \rowsep
29-
\ref{cstdint} & Integer types & \tcode{<cstdint>} \\ \rowsep
29+
\ref{cstdint} & Integer types & \tcode{<cstdint>} \\ \rowsep
3030
\ref{support.start.term} & Start and termination & \tcode{<cstdlib>} \\ \rowsep
3131
\ref{support.dynamic} & Dynamic memory management & \tcode{<new>} \\ \rowsep
3232
\ref{support.rtti} & Type identification & \tcode{<typeinfo>} \\ \rowsep
3333
\ref{support.exception} & Exception handling & \tcode{<exception>} \\ \rowsep
34-
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
34+
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
3535
\ref{support.runtime} & Other runtime support & \tcode{<csignal>} \\
3636
& & \tcode{<csetjmp>} \\
37-
& & \tcode{<cstdalign>} \\
3837
& & \tcode{<cstdarg>} \\
39-
& & \tcode{<cstdbool>} \\
4038
& & \tcode{<cstdlib>} \\
4139
\end{libsumtab}
4240

@@ -3349,9 +3347,7 @@
33493347
Headers
33503348
\tcode{<csetjmp>} (nonlocal jumps),
33513349
\tcode{<csignal>} (signal handling),
3352-
\tcode{<cstdalign> (alignment),}
33533350
\tcode{<cstdarg>} (variable arguments),
3354-
\tcode{<cstdbool>} (\xname{bool_true_false_are_defined}),
33553351
and
33563352
\tcode{<cstdlib>} (runtime environment \tcode{getenv(), system()}),
33573353
provide further compatibility with C code.
@@ -3456,41 +3452,6 @@
34563452

34573453
\xref ISO C~7.13.
34583454

3459-
\rSec2[cstdbool.syn]{Header \tcode{<cstdbool>} synopsis}
3460-
3461-
\indexlibrary{\idxhdr{cstdbool}}%
3462-
\indexlibrary{\idxcode{__bool_true_false_are_defined}}%
3463-
\begin{codeblock}
3464-
#define @\xname{bool_true_false_are_defined}@ 1
3465-
\end{codeblock}
3466-
3467-
\pnum
3468-
\indexlibrary{\idxhdr{stdbool.h}}%
3469-
The contents of the header \tcode{<cstdbool>} are the same as the C
3470-
standard library header \tcode{<stdbool.h>}, with the following changes:
3471-
The header \tcode{<cstdbool>} and the header \tcode{<stdbool.h>} shall not
3472-
define macros named \tcode{bool}, \tcode{true}, or \tcode{false}.
3473-
3474-
\xref ISO C~7.18.
3475-
3476-
\rSec2[cstdalign.syn]{Header \tcode{<cstdalign>} synopsis}
3477-
3478-
\indexlibrary{\idxcode{__alignas_is_defined}}%
3479-
\indexlibrary{\idxhdr{cstdalign}}%
3480-
\begin{codeblock}
3481-
#define @\xname{alignas_is_defined}@ 1
3482-
\end{codeblock}
3483-
3484-
\pnum
3485-
\indexlibrary{\idxhdr{cstdalign}}%
3486-
\indexlibrary{\idxhdr{stdalign.h}}%
3487-
The contents of the header \tcode{<cstdalign>} are the same as the C
3488-
standard library header \tcode{<stdalign.h>}, with the following changes:
3489-
The header \tcode{<cstdalign>} and the header \tcode{<stdalign.h>} shall not
3490-
define a macro named \tcode{alignas}.
3491-
3492-
\xref ISO C~7.15.
3493-
34943455
\rSec2[csignal.syn]{Header \tcode{<csignal>} synopsis}
34953456

34963457
\indexlibrary{\idxhdr{csignal}}%

0 commit comments

Comments
 (0)