4 /// handy notations for a signed comparison
5 #define template_instantiate_compare(type, function, prefix) \
6 prefix inline bool operator>(type t1, type t2) { return function(t1, t2) > 0; } \
7 prefix inline bool operator>=(type t1, type t2) { return function(t1, t2) >= 0; } \
8 prefix inline bool operator==(type t1, type t2) { return function(t1, t2) == 0; } \
9 prefix inline bool operator<=(type t1, type t2) { return function(t1, t2) <= 0; } \
10 prefix inline bool operator<(type t1, type t2) { return function(t1, t2) < 0; } \
11 prefix inline type MAX(type t1, type t2) { return (t1 > t2 )? t1 : t2; }\
12 prefix inline type MIN(type t1, type t2) { return (t1 < t2 )? t1 : t2; }\
14 prefix bool operator<(type t1, type t2) /* stupid fix to allow ; */
16 make the operators{<,<=,==,>=,>} and the MAX and MIN of two.
17 Please fill a & in the type argument if necessary.
22 #define instantiate_compare(type, func) template_instantiate_compare(type,func, )