Fix Windows max mix-up (#2903)

This commit is contained in:
frithrah 2022-05-19 00:35:26 +01:00 committed by GitHub
parent 6bf039d750
commit 147e8ca580
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1467,7 +1467,7 @@ inline std::chrono::duration<Rep, std::milli> get_milliseconds(
// microseconds precision.
template <long long Num, long long Den, int N = 0,
bool Enabled =
(N < 19) && (Num <= std::numeric_limits<long long>::max() / 10)>
(N < 19) && (Num <= max_value<long long>() / 10)>
struct count_fractional_digits {
static constexpr int value =
Num % Den == 0 ? N : count_fractional_digits<Num * 10, Den, N + 1>::value;