diff --git a/misc.h b/misc.h index 1f6f80de1..8a2fa3988 100644 --- a/misc.h +++ b/misc.h @@ -1287,7 +1287,11 @@ inline word128 NumericLimitsMin() template<> inline word128 NumericLimitsMax() { +#if defined(CRYPTOPP_APPLE_CLANG_VERSION) return (static_cast(LWORD_MAX) << 64U) | LWORD_MAX; +#else + return (std::numeric_limits::max)(); +#endif } #endif