The C headers either have no effect,
such as <stdbool.h> and <stdalign.h>, or
otherwise the corresponding header of the form <cname>
provides the same facilities and
assuredly defines them in namespace std.
The following source file is both valid C++ and valid ISO C.
Viewed as C++, it declares a function with C language linkage;
viewed as C it simply declares a function (and provides a prototype).
#include<stdbool.h>// for bool in C, no effect in C++#include<stddef.h>// for size_t#ifdef __cplusplus // see [cpp.predefined]extern"C"// see [dcl.link]#endifvoid f(bool b, size_t n);
— end example]
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.