4 (c) 1996 Han-Wen Nienhuys
10 #define one_operator(type, function, op) \
11 inline bool operator op (type t1, type t2) { return function(t1, t2) op 0; }
13 /// handy notations for a signed comparison
14 #define template_instantiate_compare(type, function, prefix) \
15 prefix one_operator(type, function, >)\
16 prefix one_operator(type, function, >=)\
17 prefix one_operator(type, function, ==)\
18 prefix one_operator(type, function, !=)\
19 prefix one_operator(type, function, <)\
20 prefix one_operator(type, function, <=)\
21 prefix inline type MAX(type t1, type t2) { return (t1 > t2 )? t1 : t2; }\
22 prefix inline type MIN(type t1, type t2) { return (t1 < t2 )? t1 : t2; }\
24 prefix bool operator<(type t1, type t2) /* stupid fix to allow ; */
26 make the operators{<,<=,==,>=,>} and the MAX and MIN of two.
27 Please fill a & in the type argument if necessary.
32 #define instantiate_compare(type, func) template_instantiate_compare(type,func, )