diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:03:47 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:04:23 +0000 |
| commit | 7fa27ce4a07f19b07799a767fc29416f3b625afb (patch) | |
| tree | 27825c83636c4de341eb09a74f49f5d38a15d165 /libcxx/include/__algorithm/shift_left.h | |
| parent | e3b557809604d036af6e00c60f012c2025b59a5e (diff) | |
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 |
