研究日誌。

大規模なグラフ処理に対してメモリ階層構造を考慮した高性能なソフトウェアを開発。

stdbool.h

2010-02-28 12:47:41 | Weblog
bool 型は unsigned char で定義されているそう。
flag に使うなら 3 bit 残っていることになる。
/* /usr/include/curses.h */
typedef unsigned char NCURSES_BOOL;
#define NCURSES_BOOL bool

/* /usr/include/ncurses.h */
typedef unsigned char NCURSES_BOOL;
#define NCURSES_BOOL bool

/* /usr/include/stdbool.h */
#define false   (bool)0
#define true    (bool)1