diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-09-02 21:17:18 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-01-07 17:46:17 +0000 |
| commit | fe013be447cd855ccaf6094a1d06aea570450629 (patch) | |
| tree | 9adc1e0a5d25b6280995832bb29d592fb80554a6 /contrib/llvm-project/libcxx/include/__algorithm/shift_left.h | |
| parent | 2f3b605b2e159522ecab77fd518e8139aaf581e9 (diff) | |
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/shift_left.h')
| -rw-r--r-- | contrib/llvm-project/libcxx/include/__algorithm/shift_left.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/shift_left.h b/contrib/llvm-project/libcxx/include/__algorithm/shift_left.h index 33f06d57e23a..023b56dcfcae 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/shift_left.h +++ b/contrib/llvm-project/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 |
