No min() and max() macros in c++

This commit is contained in:
Ralph Lange
2001-02-13 20:49:44 +00:00
parent 6ccd369d90
commit 35b2755efe

View File

@@ -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))