From dca8ddc65919be7df60c0ba3bec43160fed106c7 Mon Sep 17 00:00:00 2001 From: Robert Campion Date: Mon, 10 Jun 2019 15:02:19 -0400 Subject: [PATCH] Replace computed value with standard macro --- include/date/date.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/date/date.h b/include/date/date.h index 14d76f2..dde634b 100644 --- a/include/date/date.h +++ b/include/date/date.h @@ -1154,8 +1154,7 @@ private: static const std::intmax_t d1 = R1::den / gcd_d1_d2; static const std::intmax_t n2 = R2::num / gcd_n1_n2; static const std::intmax_t d2 = R2::den / gcd_d1_d2; - static const std::intmax_t max = -((std::intmax_t(1) << - (sizeof(std::intmax_t) * CHAR_BIT - 1)) + 1); + static const std::intmax_t max = INTMAX_MAX; template struct mul // overflow == false