diff options
author | deep <deep@yandex-team.com> | 2024-07-09 21:29:04 +0300 |
---|---|---|
committer | deep <deep@yandex-team.com> | 2024-07-09 21:41:18 +0300 |
commit | 4e76d760c9740b2785c03ee4717e1c48e61ae049 (patch) | |
tree | 8b544ab5c945224a9d08303b9b54937d70dc3dab /library/cpp | |
parent | 1380afae2babc6dfd840720c694613ec10d3c9ac (diff) | |
download | ydb-4e76d760c9740b2785c03ee4717e1c48e61ae049.tar.gz |
YTORM-1042 Fix casts for floating point
https://en.cppreference.com/w/cpp/types/numeric_limits/lowest
349097f620987be824e9db00f76af89746741c75
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/yt/misc/cast-inl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/cpp/yt/misc/cast-inl.h b/library/cpp/yt/misc/cast-inl.h index 59be41ac1cf..a694394f88d 100644 --- a/library/cpp/yt/misc/cast-inl.h +++ b/library/cpp/yt/misc/cast-inl.h @@ -21,7 +21,7 @@ template <class T, class S> bool IsInIntegralRange(S value) requires std::is_signed_v<T> && std::is_signed_v<S> { - return value >= std::numeric_limits<T>::min() && value <= std::numeric_limits<T>::max(); + return value >= std::numeric_limits<T>::lowest() && value <= std::numeric_limits<T>::max(); } template <class T, class S> @@ -98,7 +98,7 @@ T CheckedIntegralCast(S value) TypeName<S>().c_str(), NYT::NDetail::FormatInvalidCastValue(value).c_str(), TypeName<T>().c_str(), - ::ToString(std::numeric_limits<T>::min()).c_str(), + ::ToString(std::numeric_limits<T>::lowest()).c_str(), ::ToString(std::numeric_limits<T>::max()).c_str())); } return result; |