mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-25 23:40:53 +08:00
Use LLONG_MAX instead of std::numeric_limits<long long>::max() when constexpr is absent
This commit is contained in:
parent
d7a0bf1fa7
commit
057b441ceb
@ -1166,7 +1166,11 @@ 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;
|
||||
#ifdef __cpp_constexpr
|
||||
static const std::intmax_t max = std::numeric_limits<std::intmax_t>::max();
|
||||
#else
|
||||
static const std::intmax_t max = LLONG_MAX;
|
||||
#endif
|
||||
|
||||
template <std::intmax_t Xp, std::intmax_t Yp, bool overflow>
|
||||
struct mul // overflow == false
|
||||
|
Loading…
x
Reference in New Issue
Block a user