diff options
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/copy_n.h')
| -rw-r--r-- | contrib/llvm-project/libcxx/include/__algorithm/copy_n.h | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/copy_n.h b/contrib/llvm-project/libcxx/include/__algorithm/copy_n.h index f3701662aac3..1707e26688c6 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/copy_n.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/copy_n.h @@ -21,17 +21,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template<class _InputIterator, class _Size, class _OutputIterator> -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 +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_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 +_OutputIterator copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) { - typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize; + typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize; _IntegralSize __n = __orig_n; if (__n > 0) { @@ -47,19 +44,16 @@ copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) return __result; } -template<class _InputIterator, class _Size, class _OutputIterator> -inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 -typename enable_if -< - __has_random_access_iterator_category<_InputIterator>::value, - _OutputIterator ->::type +template<class _InputIterator, class _Size, class _OutputIterator, + __enable_if_t<__has_random_access_iterator_category<_InputIterator>::value, int> = 0> +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 +_OutputIterator copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator>::difference_type difference_type; - typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize; + typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize; _IntegralSize __n = __orig_n; - return _VSTD::copy(__first, __first + difference_type(__n), __result); + return std::copy(__first, __first + difference_type(__n), __result); } _LIBCPP_END_NAMESPACE_STD |
