stdbool.h: bool is now typedef'd to _Bool compiler intrinsic instead of char. This and the t/f enum is now guarded behind a stdc check.
This commit is contained in:
parent
c975a86805
commit
4760e1f742
1 changed files with 5 additions and 3 deletions
|
|
@ -1,8 +1,10 @@
|
||||||
#ifndef _STDBOOL_H
|
#ifndef _STDBOOL_H
|
||||||
#define _STDBOOL_H
|
#define _STDBOOL_H
|
||||||
|
|
||||||
/*TODO*/
|
/* Otherwise, bool, true and false are keywords. */
|
||||||
typedef char bool;
|
#if !(defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L)
|
||||||
enum { false = 0, true = 1 };
|
typedef _Bool bool;
|
||||||
|
enum : bool { false = 0, true = 1 };
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // _STDBOOL_H
|
#endif // _STDBOOL_H
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue