Annex D (normative) Compatibility features [depr]

D.10 C headers [depr.c.headers]

D.10.1 General [depr.c.headers.general]

For compatibility with the C standard library, the C++ standard library provides the C headers shown in Table 147.
Table 147: C headers [tab:depr.c.headers]
<assert.h>
<inttypes.h>
<signal.h>
<stdio.h>
<wchar.h>
<stdlib.h>
<wctype.h>
<ctype.h>
<limits.h>
<stdarg.h>
<string.h>
<errno.h>
<locale.h>
<fenv.h>
<math.h>
<stddef.h>
<time.h>
<float.h>
<setjmp.h>
<stdint.h>
<uchar.h>

D.10.2 Header <complex.h> synopsis [depr.complex.h.syn]

#include <complex>
The header <complex.h> behaves as if it simply includes the header <complex>.
[Note 1:
Names introduced by <complex> in namespace std are not placed into the global namespace scope by <complex.h>.
β€” end note]

D.10.3 Header <iso646.h> synopsis [depr.iso646.h.syn]

The C++ header <iso646.h> is empty.
[Note 1:
and, and_­eq, bitand, bitor, compl, not_­eq, not, or, or_­eq, xor, and xor_­eq are keywords in C++ ([lex.key]).
β€” end note]

D.10.4 Header <stdalign.h> synopsis [depr.stdalign.h.syn]

#define __alignas_is_defined 1
The contents of the C++ header <stdalign.h> are the same as the C standard library header <stdalign.h>, with the following changes: The header <stdalign.h> does not define a macro named alignas.
See also: ISO C 7.15

D.10.5 Header <stdbool.h> synopsis [depr.stdbool.h.syn]

#define __bool_true_false_are_defined 1
The contents of the C++ header <stdbool.h> are the same as the C standard library header <stdbool.h>, with the following changes: The header <stdbool.h> does not define macros named bool, true, or false.
See also: ISO C 7.18

D.10.6 Header <tgmath.h> synopsis [depr.tgmath.h.syn]

#include <cmath> #include <complex>
The header <tgmath.h> behaves as if it simply includes the headers <cmath> and <complex>.
[Note 1:
The overloads provided in C by type-generic macros are already provided in <complex> and <cmath> by β€œsufficient” additional overloads.
β€” end note]
[Note 2:
Names introduced by <cmath> or <complex> in namespace std are not placed into the global namespace scope by <tgmath.h>.
β€” end note]

D.10.7 Other C headers [depr.c.headers.other]

Every C header other than <complex.h>, <iso646.h>, <stdalign.h>,
<stdbool.h>, and <tgmath.h>, each of which has a name of the form <name.h>, behaves as if each name placed in the standard library namespace by the corresponding <cname> header is placed within the global namespace scope, except for the functions described in [sf.cmath], the declaration of std​::​byte ([cstddef.syn]), and the functions and function templates described in [support.types.byteops].
It is unspecified whether these names are first declared or defined within namespace scope ([basic.scope.namespace]) of the namespace std and are then injected into the global namespace scope by explicit using-declarations ([namespace.udecl]).
[Example 1:
The header <cstdlib> assuredly provides its declarations and definitions within the namespace std.
It may also provide these names within the global namespace.
The header <stdlib.h> assuredly provides the same declarations and definitions within the global namespace, much as in the C Standard.
It may also provide these names within the namespace std.
β€” end example]