diff options
Diffstat (limited to 'libcxx/include/__algorithm/shift_left.h')
| -rw-r--r-- | libcxx/include/__algorithm/shift_left.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libcxx/include/__algorithm/shift_left.h b/libcxx/include/__algorithm/shift_left.h index 33f06d57e23a..023b56dcfcae 100644 --- a/libcxx/include/__algorithm/shift_left.h +++ b/libcxx/include/__algorithm/shift_left.h @@ -12,7 +12,6 @@ #include <__algorithm/move.h> #include <__config> #include <__iterator/iterator_traits.h> -#include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -20,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if _LIBCPP_STD_VER > 17 +#if _LIBCPP_STD_VER >= 20 template <class _ForwardIterator> inline _LIBCPP_INLINE_VISIBILITY constexpr @@ -33,7 +32,7 @@ shift_left(_ForwardIterator __first, _ForwardIterator __last, } _ForwardIterator __m = __first; - if constexpr (__is_cpp17_random_access_iterator<_ForwardIterator>::value) { + if constexpr (__has_random_access_iterator_category<_ForwardIterator>::value) { if (__n >= __last - __first) { return __first; } @@ -49,7 +48,7 @@ shift_left(_ForwardIterator __first, _ForwardIterator __last, return _VSTD::move(__m, __last, __first); } -#endif // _LIBCPP_STD_VER > 17 +#endif // _LIBCPP_STD_VER >= 20 _LIBCPP_END_NAMESPACE_STD |
