No min() and max() macros in c++
This commit is contained in:
@@ -75,6 +75,8 @@
|
||||
(sizeof (array) / sizeof ((array) [0]))
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#ifndef max
|
||||
#define max(x, y) (((x) < (y)) ? (y) : (x))
|
||||
#endif
|
||||
@@ -82,6 +84,8 @@
|
||||
#define min(x, y) (((x) < (y)) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef OFFSET
|
||||
#define OFFSET(structure, member) /* byte offset of member in structure*/\
|
||||
((int) &(((structure *) 0) -> member))
|
||||
|
||||
Reference in New Issue
Block a user