2014-02-03から1日間の記事一覧
愚直な実装。 #define TRUE 1 #define FALSE 0 #define IF_1(x, y) x #define IF_0(x, y) y #define IF_I(cond, x, y) IF_##cond(x, y) #define IF(cond, x, y) IF_I(cond, x, y) IF(TRUE, hello, world) IF(FALSE, hello, world)
愚直な実装。 #define TRUE 1 #define FALSE 0 #define IF_1(x, y) x #define IF_0(x, y) y #define IF_I(cond, x, y) IF_##cond(x, y) #define IF(cond, x, y) IF_I(cond, x, y) IF(TRUE, hello, world) IF(FALSE, hello, world)