types.hpp: implement smin, smax, amin, amax
Rewritten the following global utility constants: `umax` returns max number, restricted to unsigned. `smax` returns max signed number, restricted to integrals. `smin` returns min signed number, restricted to signed. `amin` returns smin or zero, less restricted. `amax` returns smax or umax, less restricted. Fix operators == and <=> for synthesized rel-ops.
This commit is contained in:
+1
-1
@@ -91,5 +91,5 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static constexpr u64 max_timeout = UINT64_MAX / 1000;
|
||||
static constexpr u64 max_timeout = u64{umax} / 1000;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user