Can a C++ standard library header include a C standard header?

For the purpose of the question you follow up with (name conflicts), yes, it certainly can. The reason is that the C++ standard library includes the <c:::> C++ headers for the C standard library contents, and the standard explicitly allows these to provide the names in the global namespace as well (in addition to mandatorily providing them in ::std).

Further, based on Annex D [depr] of the C++ standard, the C standard library headers (the <:::.h> versions) are also part of the C++ standard library (albeit deprecated). This means [res.on.headers]/1 allows C++ headers to include them.


Section D.3 C standard library headers of the C++ standard makes 26 C standard headers part of C++. Thus those are part of C++. Also many other C headers adhere to the shared subset of the languages (probably by #ifdefing some things out) making them both, valid C and C++ headers.