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/is_permutation.h | |
| parent | 2f3b605b2e159522ecab77fd518e8139aaf581e9 (diff) | |
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/is_permutation.h')
| -rw-r--r-- | contrib/llvm-project/libcxx/include/__algorithm/is_permutation.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/is_permutation.h b/contrib/llvm-project/libcxx/include/__algorithm/is_permutation.h index 005445652e9d..105a0732283c 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/is_permutation.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/is_permutation.h @@ -19,19 +19,22 @@ #include <__iterator/distance.h> #include <__iterator/iterator_traits.h> #include <__iterator/next.h> +#include <__type_traits/is_callable.h> #include <__utility/move.h> -#include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class = void> struct _ConstTimeDistance : false_type {}; -#if _LIBCPP_STD_VER > 17 +#if _LIBCPP_STD_VER >= 20 template <class _Iter1, class _Sent1, class _Iter2, class _Sent2> struct _ConstTimeDistance<_Iter1, _Sent1, _Iter2, _Sent2, __enable_if_t< @@ -47,7 +50,7 @@ struct _ConstTimeDistance<_Iter1, _Iter1, _Iter2, _Iter2, __enable_if_t< is_same<typename iterator_traits<_Iter2>::iterator_category, random_access_iterator_tag>::value > > : true_type {}; -#endif // _LIBCPP_STD_VER > 17 +#endif // _LIBCPP_STD_VER >= 20 // Internal functions @@ -202,7 +205,7 @@ is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIt return std::is_permutation(__first1, __last1, __first2, __equal_to()); } -#if _LIBCPP_STD_VER > 11 +#if _LIBCPP_STD_VER >= 14 // 2+2 iterators template <class _ForwardIterator1, class _ForwardIterator2> @@ -231,8 +234,10 @@ is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIt __pred, __identity(), __identity()); } -#endif // _LIBCPP_STD_VER > 11 +#endif // _LIBCPP_STD_VER >= 14 _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_IS_PERMUTATION_H |
