Skip to content

Commit f464c00

Browse files
committed
Move specification of deprecated headers to Annex D
1 parent d24c6bc commit f464c00

File tree

5 files changed

+98
-103
lines changed

5 files changed

+98
-103
lines changed

source/compatibility.tex

+6-6
Original file line numberDiff line numberDiff line change
@@ -1775,16 +1775,16 @@
17751775
nor are the C headers themselves part of \Cpp.
17761776

17771777
\pnum
1778-
The headers \tcode{<ccomplex>}\indextext{\idxhdr{ccomplex}} (\ref{ccomplex.syn})
1779-
and \tcode{<ctgmath>}\indextext{\idxhdr{ctgmath}} (\ref{ctgmath.syn}), as well
1778+
The headers \tcode{<ccomplex>}\indextext{\idxhdr{ccomplex}} (\ref{depr.ccomplex.syn})
1779+
and \tcode{<ctgmath>}\indextext{\idxhdr{ctgmath}} (\ref{depr.ctgmath.syn}), as well
17801780
as their corresponding C headers \tcode{<complex.h>}\indextext{\idxhdr{complex.h}}
17811781
and \tcode{<tgmath.h>}\indextext{\idxhdr{tgmath.h}}, do not contain any of the
17821782
content from the C standard library and instead merely include other headers
17831783
from the \Cpp standard library.
17841784

17851785
\pnum
1786-
The headers \tcode{<ciso646>}, \tcode{<cstdalign>}~(\ref{cstdalign.syn}),
1787-
and \tcode{<cstdbool>}~(\ref{cstdbool.syn}) are meaningless in \Cpp. Use of
1786+
The headers \tcode{<ciso646>}, \tcode{<cstdalign>}~(\ref{depr.cstdalign.syn}),
1787+
and \tcode{<cstdbool>}~(\ref{depr.cstdbool.syn}) are meaningless in \Cpp. Use of
17881788
the \Cpp headers \tcode{<ccomplex>}, \tcode{<cstdalign>}, \tcode{<cstdbool>},
17891789
and \tcode{<ctgmath>} is deprecated~(\ref{depr.c.headers}).
17901790

@@ -1849,7 +1849,7 @@
18491849
\pnum
18501850
The token \tcode{alignas} is a keyword in this International
18511851
Standard (\ref{lex.key}). It does not appear as a macro name defined
1852-
in \tcode{<cstdalign>}\indexlibrary{\idxhdr{cstdalign}}~(\ref{cstdalign.syn}).
1852+
in \tcode{<cstdalign>}\indexlibrary{\idxhdr{cstdalign}}~(\ref{depr.cstdalign.syn}).
18531853

18541854
\rSec3[diff.header.stdbool.h]{Header \tcode{<stdbool.h>}}
18551855
\indexlibrary{\idxhdr{stdbool.h}}%
@@ -1858,7 +1858,7 @@
18581858
The tokens \tcode{bool}, \tcode{true}, and \tcode{false}
18591859
are keywords in this International Standard (\ref{lex.key}).
18601860
They do not appear as macro names defined in
1861-
\tcode{<cstdbool>}\indexlibrary{\idxhdr{cstdbool}}~(\ref{cstdbool.syn}).
1861+
\tcode{<cstdbool>}\indexlibrary{\idxhdr{cstdbool}}~(\ref{depr.cstdbool.syn}).
18621862

18631863
\rSec3[diff.null]{Macro \tcode{NULL}}
18641864

source/future.tex

+77-9
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,82 @@
4848
\pnum
4949
The \grammarterm{noexcept-specifier} \tcode{throw()} is deprecated.
5050

51+
\rSec1[depr.cpp.headers]{\Cpp standard library headers}
52+
53+
\pnum
54+
For compatibility with prior \Cpp International Standards,
55+
the \Cpp standard library provides headers
56+
\tcode{<ccomplex>}~(\ref{depr.ccomplex.syn}),
57+
\tcode{<cstdalign>}~(\ref{depr.cstdalign.syn}),
58+
\tcode{<cstdbool>}~(\ref{depr.cstdbool.syn}),
59+
and \tcode{<ctgmath>}~(\ref{depr.ctgmath.syn}).
60+
The use of these headers is deprecated.
61+
62+
\rSec2[depr.ccomplex.syn]{Header \tcode{<ccomplex>} synopsis}
63+
\indexlibrary{\idxhdr{ccomplex}}%
64+
65+
\begin{codeblock}
66+
#include <complex>
67+
\end{codeblock}
68+
69+
\pnum
70+
The header \tcode{<ccomplex>}
71+
behaves as if it simply includes the header
72+
\tcode{<complex>}~(\ref{complex.syn}).
73+
74+
\rSec2[depr.cstdalign.syn]{Header \tcode{<cstdalign>} synopsis}
75+
76+
\indexlibrary{\idxcode{__alignas_is_defined}}%
77+
\indexlibrary{\idxhdr{cstdalign}}%
78+
\begin{codeblock}
79+
#define @\xname{alignas_is_defined}@ 1
80+
\end{codeblock}
81+
82+
\pnum
83+
\indexlibrary{\idxhdr{cstdalign}}%
84+
\indexlibrary{\idxhdr{stdalign.h}}%
85+
The contents of the header \tcode{<cstdalign>} are the same as the C
86+
standard library header \tcode{<stdalign.h>}, with the following changes:
87+
The header \tcode{<cstdalign>} and the header \tcode{<stdalign.h>} shall not
88+
define a macro named \tcode{alignas}.
89+
90+
\xref ISO C~7.15.
91+
92+
\rSec2[depr.cstdbool.syn]{Header \tcode{<cstdbool>} synopsis}
93+
94+
\indexlibrary{\idxhdr{cstdbool}}%
95+
\indexlibrary{\idxcode{__bool_true_false_are_defined}}%
96+
\begin{codeblock}
97+
#define @\xname{bool_true_false_are_defined}@ 1
98+
\end{codeblock}
99+
100+
\pnum
101+
\indexlibrary{\idxhdr{stdbool.h}}%
102+
The contents of the header \tcode{<cstdbool>} are the same as the C
103+
standard library header \tcode{<stdbool.h>}, with the following changes:
104+
The header \tcode{<cstdbool>} and the header \tcode{<stdbool.h>} shall not
105+
define macros named \tcode{bool}, \tcode{true}, or \tcode{false}.
106+
107+
\xref ISO C~7.18.
108+
109+
\rSec2[depr.ctgmath.syn]{Header \tcode{<ctgmath>} synopsis}
110+
111+
\indexlibrary{\idxhdr{ctgmath}}%
112+
\begin{codeblock}
113+
#include <complex>
114+
#include <cmath>
115+
\end{codeblock}
116+
117+
\pnum
118+
The header \tcode{<ctgmath>} simply includes the headers
119+
\tcode{<complex>}~(\ref{complex.syn})
120+
and \tcode{<cmath>}~(\ref{cmath.syn}).
121+
122+
\pnum
123+
\begin{note} The overloads provided in C by type-generic macros are already
124+
provided in \tcode{<complex>} and \tcode{<cmath>} by ``sufficient'' additional
125+
overloads.\end{note}
126+
51127
\rSec1[depr.c.headers]{C standard library headers}
52128

53129
\pnum
@@ -94,19 +170,11 @@
94170

95171
\end{floattable}
96172

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-
105173
\pnum
106174
The header \tcode{<complex.h>} behaves as if it simply includes the header \tcode{<ccomplex>}.
107175

108176
\pnum
109-
Every other C header, each of
177+
Except for the functions declared in \ref{sf.cmath}, every other C header, each of
110178
which has a name of the form
111179
\indextext{header!C}%
112180
\tcode{name.h},

source/lib-intro.tex

+13-12
Original file line numberDiff line numberDiff line change
@@ -1284,18 +1284,19 @@
12841284
include at least the headers shown in Table~\ref{tab:cpp.headers.freestanding}.
12851285

12861286
\begin{libsumtab}{\Cpp headers for freestanding implementations}{tab:cpp.headers.freestanding}
1287-
& & \tcode{<ciso646>} \\ \rowsep
1288-
\ref{support.types} & Types & \tcode{<cstddef>} \\ \rowsep
1289-
\ref{support.limits}& Implementation properties & \tcode{<cfloat>} \tcode{<limits>} \tcode{<climits>} \\ \rowsep
1290-
\ref{cstdint} & Integer types & \tcode{<cstdint>} \\ \rowsep
1291-
\ref{support.start.term}& Start and termination & \tcode{<cstdlib>} \\ \rowsep
1292-
\ref{support.dynamic} & Dynamic memory management & \tcode{<new>} \\ \rowsep
1293-
\ref{support.rtti} & Type identification & \tcode{<typeinfo>} \\ \rowsep
1294-
\ref{support.exception} & Exception handling & \tcode{<exception>} \\ \rowsep
1295-
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
1296-
\ref{support.runtime} & Other runtime support & \tcode{<cstdalign>} \tcode{<cstdarg>} \tcode{<cstdbool>} \\ \rowsep
1297-
\ref{meta} & Type traits & \tcode{<type_traits>} \\ \rowsep
1298-
\ref{atomics} & Atomics & \tcode{<atomic>} \\
1287+
& & \tcode{<ciso646>} \\ \rowsep
1288+
\ref{support.types} & Types & \tcode{<cstddef>} \\ \rowsep
1289+
\ref{support.limits} & Implementation properties & \tcode{<cfloat>} \tcode{<limits>} \tcode{<climits>} \\ \rowsep
1290+
\ref{cstdint} & Integer types & \tcode{<cstdint>} \\ \rowsep
1291+
\ref{support.start.term} & Start and termination & \tcode{<cstdlib>} \\ \rowsep
1292+
\ref{support.dynamic} & Dynamic memory management & \tcode{<new>} \\ \rowsep
1293+
\ref{support.rtti} & Type identification & \tcode{<typeinfo>} \\ \rowsep
1294+
\ref{support.exception} & Exception handling & \tcode{<exception>} \\ \rowsep
1295+
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
1296+
\ref{support.runtime} & Other runtime support & \tcode{<cstdarg>} \\ \rowsep
1297+
\ref{meta} & Type traits & \tcode{<type_traits>} \\ \rowsep
1298+
\ref{atomics} & Atomics & \tcode{<atomic>} \\ \rowsep
1299+
\ref{depr.cstdalign.syn}, \ref{depr.cstdbool.syn} & Deprecated headers & \tcode{<cstdalign>} \tcode{<cstdbool>} \\
12991300
\end{libsumtab}
13001301

13011302
\pnum

source/numerics.tex

+1-32
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}
@@ -1363,18 +1362,6 @@
13631362
\tcode{complex<float>\{0.0f, static_cast<float>(d)\}}.
13641363
\end{itemdescr}
13651364

1366-
\rSec2[ccomplex.syn]{Header \tcode{<ccomplex>} synopsis}
1367-
\indextext{\idxhdr{ccomplex}}%
1368-
\indexlibrary{\idxhdr{ccomplex}}%
1369-
1370-
\begin{codeblock}
1371-
#include <complex>
1372-
\end{codeblock}
1373-
1374-
\pnum
1375-
The header \tcode{<ccomplex>}
1376-
behaves as if it simply includes the header \tcode{<complex>}.
1377-
13781365
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13791366
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13801367
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -11261,21 +11248,3 @@
1126111248
\end{itemdescr}
1126211249

1126311250
\indextext{mathematical special functions|)}
11264-
11265-
\rSec2[ctgmath.syn]{Header \tcode{<ctgmath>} synopsis}
11266-
11267-
\indextext{\idxhdr{ctgmath}}%
11268-
\indexlibrary{\idxhdr{ctgmath}}%
11269-
\begin{codeblock}
11270-
#include <complex>
11271-
#include <cmath>
11272-
\end{codeblock}
11273-
11274-
\pnum
11275-
The header \tcode{<ctgmath>} simply includes the headers \tcode{<complex>}
11276-
and \tcode{<cmath>}.
11277-
11278-
\pnum
11279-
\begin{note} The overloads provided in C by type-generic macros are already
11280-
provided in \tcode{<complex>} and \tcode{<cmath>} by ``sufficient'' additional
11281-
overloads.\end{note}

source/support.tex

+1-44
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@
3232
\ref{support.dynamic} & Dynamic memory management & \tcode{<new>} \\ \rowsep
3333
\ref{support.rtti} & Type identification & \tcode{<typeinfo>} \\ \rowsep
3434
\ref{support.exception} & Exception handling & \tcode{<exception>} \\ \rowsep
35-
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
35+
\ref{support.initlist} & Initializer lists & \tcode{<initializer_list>} \\ \rowsep
3636
\ref{support.runtime} & Other runtime support & \tcode{<csignal>} \\
3737
& & \tcode{<csetjmp>} \\
38-
& & \tcode{<cstdalign>} \\
3938
& & \tcode{<cstdarg>} \\
40-
& & \tcode{<cstdbool>} \\
4139
& & \tcode{<cstdlib>} \\
4240
\end{libsumtab}
4341

@@ -3731,9 +3729,7 @@
37313729
Headers
37323730
\tcode{<csetjmp>} (nonlocal jumps),
37333731
\tcode{<csignal>} (signal handling),
3734-
\tcode{<cstdalign> (alignment),}
37353732
\tcode{<cstdarg>} (variable arguments),
3736-
\tcode{<cstdbool>} (\xname{bool_true_false_are_defined}),
37373733
and
37383734
\tcode{<cstdlib>} (runtime environment \tcode{getenv, system}),
37393735
provide further compatibility with C code.
@@ -3845,45 +3841,6 @@
38453841

38463842
\xref ISO C~7.13.
38473843

3848-
\rSec2[cstdbool.syn]{Header \tcode{<cstdbool>} synopsis}
3849-
3850-
\indextext{\idxhdr{cstdbool}}%
3851-
\indexlibrary{\idxhdr{cstdbool}}%
3852-
\indexlibrary{\idxcode{__bool_true_false_are_defined}}%
3853-
\begin{codeblock}
3854-
#define @\xname{bool_true_false_are_defined}@ 1
3855-
\end{codeblock}
3856-
3857-
\pnum
3858-
\indextext{\idxhdr{stdbool.h}}%
3859-
\indexlibrary{\idxhdr{stdbool.h}}%
3860-
The contents of the header \tcode{<cstdbool>} are the same as the C
3861-
standard library header \tcode{<stdbool.h>}, with the following changes:
3862-
The header \tcode{<cstdbool>} and the header \tcode{<stdbool.h>} shall not
3863-
define macros named \tcode{bool}, \tcode{true}, or \tcode{false}.
3864-
3865-
\xref ISO C~7.18.
3866-
3867-
\rSec2[cstdalign.syn]{Header \tcode{<cstdalign>} synopsis}
3868-
3869-
\indexlibrary{\idxcode{__alignas_is_defined}}%
3870-
\indextext{\idxhdr{cstdalign}}%
3871-
\indexlibrary{\idxhdr{cstdalign}}%
3872-
\begin{codeblock}
3873-
#define @\xname{alignas_is_defined}@ 1
3874-
\end{codeblock}
3875-
3876-
\pnum
3877-
\indexlibrary{\idxhdr{cstdalign}}%
3878-
\indextext{\idxhdr{stdalign.h}}%
3879-
\indexlibrary{\idxhdr{stdalign.h}}%
3880-
The contents of the header \tcode{<cstdalign>} are the same as the C
3881-
standard library header \tcode{<stdalign.h>}, with the following changes:
3882-
The header \tcode{<cstdalign>} and the header \tcode{<stdalign.h>} shall not
3883-
define a macro named \tcode{alignas}.
3884-
3885-
\xref ISO C~7.15.
3886-
38873844
\rSec2[csignal.syn]{Header \tcode{<csignal>} synopsis}
38883845

38893846
\indextext{\idxhdr{csignal}}%

0 commit comments

Comments
 (0)