diff options
author | mikhnenko <mikhnenko@yandex-team.com> | 2024-03-27 10:35:27 +0300 |
---|---|---|
committer | mikhnenko <mikhnenko@yandex-team.com> | 2024-03-27 10:47:39 +0300 |
commit | 9b902baa4a858f2176c82aa0b20f88232f0da0d8 (patch) | |
tree | 7165a551c2244c4b3c28479ac3a3f6d62346ec89 /contrib/libs/cxxsupp/libcxx/include/__algorithm/half_positive.h | |
parent | a1c989e67e438005fa0c34ed0e910536c8941862 (diff) | |
download | ydb-9b902baa4a858f2176c82aa0b20f88232f0da0d8.tar.gz |
Update libcxx to 10 Oct 2023 dc129d6f715cf83a2072fc8de8b4e4c70bca6935
97ce40d276e44357a49b7a945af841896126dca8
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__algorithm/half_positive.h')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__algorithm/half_positive.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/half_positive.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/half_positive.h index 5a0f4baf6a..e90666d134 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/half_positive.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/half_positive.h @@ -22,25 +22,17 @@ _LIBCPP_BEGIN_NAMESPACE_STD // Perform division by two quickly for positive integers (llvm.org/PR39129) -template <typename _Integral> +template <typename _Integral, __enable_if_t<is_integral<_Integral>::value, int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - is_integral<_Integral>::value, - _Integral ->::type +_Integral __half_positive(_Integral __value) { return static_cast<_Integral>(static_cast<__make_unsigned_t<_Integral> >(__value) / 2); } -template <typename _Tp> +template <typename _Tp, __enable_if_t<!is_integral<_Tp>::value, int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR -typename enable_if -< - !is_integral<_Tp>::value, - _Tp ->::type +_Tp __half_positive(_Tp __value) { return __value / 2; |