X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=ec9f9bb97f3a9a688bc6cd5d077579c9ffe3ea07;hp=f018311dc70f629b4d324a9ed96b379cf0e7f587;hb=8e31764c49149cd73cdbfd8a251bb31f068bf799;hpb=4ce08482c3b0685691162bfc9115ccc7656674b4 diff --git a/src/types.h b/src/types.h index f018311d..ec9f9bb9 100644 --- a/src/types.h +++ b/src/types.h @@ -125,6 +125,9 @@ inline T operator* (int i, const T d) { return T(int(d) * i); } template inline T operator/ (const T d, int i) { return T(int(d) / i); } +template +inline T operator- (const T d) { return T(-int(d)); } + template inline void operator++ (T& d, int) { d = T(int(d) + 1); }