4 ms·
In C23, `bool`, `true` and `false` are available without including `stdbool.h`.
by pdw 4y ago
In C23, `bool`, `true` and `false` are available without including `stdbool.h`.
- ufo 4y agoGreat news! \o/
- cesarb 4y agoIt's great news unless you're maintaining software which defines its own version of these three keywords (which was necessary before C99, and AFAIK there is a popular C compiler which still doesn't have full support for C99). And until everyone moves to C23 (which will probably take a very long time; a quick web search tells me that it took until 2015 for the aforementioned popular C compiler to add support for the C99 stdbool.h header), all C projects will still have to include that header.
- pjmlp 4y agoIf you mean MVSC, it never will, because it now supports C11 and C17, minus the optional annexes from C99 that were dropped in C11, and atomics aren't fully supported as well.
- sigsev_251 4y agoI've heard that they are working on C11 atomics, now that the C++ standard includes <stdatomic.h> for compatibility with C.
- pjmlp 4y agoMight be, that was the main goal when they gave up on C, just to improve C compatibility to the extent of ISO C++ requirements. It was the whole change of management that somehow made them backtrack on that decision.