blob: 2b724e08f89596ff1d9780000af8046bb2eca8ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#pragma once
#pragma GCC diagnostic ignored "-Wgnu-statement-expression"
#define min(x, y) \
({ \
__typeof__ (x) _x = (x); \
__typeof__ (y) _y = (y); \
_x < _y ? _x : _y; \
})
#define max(x, y) \
({ \
__typeof__ (x) _x = (x); \
__typeof__ (y) _y = (y); \
_x > _y ? _x : _y; \
})
|