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
|
||||
#define _STDBOOL_H
|
||||
|
||||
/*TODO*/
|
||||
typedef char bool;
|
||||
enum { false = 0, true = 1 };
|
||||
/* Otherwise, bool, true and false are keywords. */
|
||||
#if !(defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L)
|
||||
typedef _Bool bool;
|
||||
enum : bool { false = 0, true = 1 };
|
||||
#endif
|
||||
|
||||
#endif // _STDBOOL_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue