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/copy_n.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/copy_n.h')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h index f3701662aa..c138d59e97 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h @@ -21,14 +21,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template<class _InputIterator, class _Size, class _OutputIterator> +template<class _InputIterator, class _Size, class _OutputIterator, + __enable_if_t<__has_input_iterator_category<_InputIterator>::value && + !__has_random_access_iterator_category<_InputIterator>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 -typename enable_if -< - __has_input_iterator_category<_InputIterator>::value && - !__has_random_access_iterator_category<_InputIterator>::value, - _OutputIterator ->::type +_OutputIterator copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) { typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize; @@ -47,13 +44,10 @@ copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) return __result; } -template<class _InputIterator, class _Size, class _OutputIterator> +template<class _InputIterator, class _Size, class _OutputIterator, + __enable_if_t<__has_random_access_iterator_category<_InputIterator>::value, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 -typename enable_if -< - __has_random_access_iterator_category<_InputIterator>::value, - _OutputIterator ->::type +_OutputIterator copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator>::difference_type difference_type; |