2012年3月20日
摘要: 近日无意间发现,关于常见的min的宏定义,在Linux中是这样的:/** min()/max()/clamp() macros that also do* strict type-checking.. See the* "unnecessary" pointer comparison.*/#define min(x, y) ({ \typeof(x) _x = (x); \typeof(y) _y = (y); \(void) (&_x == &_y); \_x < _y ? _x : _y; })关于其中的:(void) (&_x == &a 阅读全文
posted @ 2012-03-20 09:42 方正圆 阅读(544) 评论(0) 推荐(1) 编辑