From f82dba019253ced73ceadfde10e5f150bdb182f3 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Mon, 18 Nov 2019 01:46:58 -0500 Subject: Rename __is_foo_iterator traits to reflect their Cpp17 nature. With the upcoming introduction of iterator concepts in ranges, the meaning of "__is_contiguous_iterator" changes drastically. Currently we intend it to mean "does it have this iterator category", but it could now also mean "does it meet the requirements of this concept", and these can be different. --- libcxx/include/algorithm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libcxx/include/algorithm') diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 7481cc21ca5..83e49f19ab9 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -1821,8 +1821,8 @@ template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED typename enable_if < - __is_input_iterator<_InputIterator>::value && - !__is_random_access_iterator<_InputIterator>::value, + __is_cpp17_input_iterator<_InputIterator>::value && + !__is_cpp17_random_access_iterator<_InputIterator>::value, _OutputIterator >::type copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) @@ -1847,7 +1847,7 @@ template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_IS_CONSTANT_EVALUATED typename enable_if < - __is_random_access_iterator<_InputIterator>::value, + __is_cpp17_random_access_iterator<_InputIterator>::value, _OutputIterator >::type copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) @@ -2520,7 +2520,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { - static_assert(__is_forward_iterator<_ForwardIterator>::value, + static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value, "std::min_element requires a ForwardIterator"); if (__first != __last) { @@ -2592,7 +2592,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { - static_assert(__is_forward_iterator<_ForwardIterator>::value, + static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value, "std::max_element requires a ForwardIterator"); if (__first != __last) { @@ -2687,7 +2687,7 @@ _LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX11 std::pair<_ForwardIterator, _ForwardIterator> minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { - static_assert(__is_forward_iterator<_ForwardIterator>::value, + static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value, "std::minmax_element requires a ForwardIterator"); std::pair<_ForwardIterator, _ForwardIterator> __result(__first, __first); if (__first != __last) @@ -3186,8 +3186,8 @@ _SampleIterator __sample(_PopulationIterator __first, _PopCategory; typedef typename iterator_traits<_PopulationIterator>::difference_type _Difference; - static_assert(__is_forward_iterator<_PopulationIterator>::value || - __is_random_access_iterator<_SampleIterator>::value, + static_assert(__is_cpp17_forward_iterator<_PopulationIterator>::value || + __is_cpp17_random_access_iterator<_SampleIterator>::value, "SampleIterator must meet the requirements of RandomAccessIterator"); typedef typename common_type<_Distance, _Difference>::type _CommonType; _LIBCPP_ASSERT(__n >= 0, "N must be a positive number."); -- cgit v1.2.3