src: portability updates

This commit is contained in:
Markus F.X.J. Oberhumer
2024-07-07 14:50:27 +02:00
parent 285472bc78
commit 16c8f6d160
21 changed files with 700 additions and 129 deletions
+1 -2
View File
@@ -219,8 +219,7 @@ forceinline constexpr T max(const T &a, const T &b) noexcept {
}
template <class T>
inline constexpr bool is_uminmax_type =
is_same_any_v<T, upx_uint8_t, upx_uint16_t, upx_uint32_t, upx_uint64_t, unsigned long, size_t>;
inline constexpr bool is_uminmax_type = std::is_integral_v<T> && std::is_unsigned_v<T>;
template <class T, class = std::enable_if_t<is_uminmax_type<T>, T> >
forceinline constexpr T umin(const T &a, const T &b) noexcept {