(My original question was going to be about "What happened to _BitInt
?" but that was based on a misreading of some cppreference pages).
The Library Introduction section 16.2 of the C++23 Draft Standard says that the C Standard library is supported in C++. The only reference to a specific C standard, however, is in a footnote (#141) in 16.3. This is to the 2018 C Standard, which doesn't mention _BitInt
. But I found a description of _BitInt
in the draft C 23 Standard.
Does the C++23 Standard incorporate a specific version of the C Standard Library?
- If so, which one?
- If not, is there a mechanism to incorporate the libraries of future C Standards?
Quoting N4950 2.2 (the final working draft of the C++23 standard):
where ISO/IEC 9899:2018 is the C17 standard.
Note while the C++23 standard names a specific C standard library version, it is still possible for an implementation to provide any additional features as language extensions. That could include support for later versions of the C standard library or support for C core language features (like
_BitInt(N)
). For example, both GCC and Clang provide C99 VLAs as a language extension when compiling C++ code, and Clang supports C23's_BitInt(N)
as an extension when compiling C++ code or C code for earlier editions.