diff options
author | hiddenpath <hiddenpath@yandex-team.com> | 2024-02-21 23:16:42 +0300 |
---|---|---|
committer | hiddenpath <hiddenpath@yandex-team.com> | 2024-02-21 23:33:25 +0300 |
commit | 9052eb5cc304b8da8885fc4e3364ebddc16945f3 (patch) | |
tree | 3c252f6161dd0745c7732d74c9304c000645ab47 /contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h | |
parent | f5eb715f103692e7c7536e13bef3f281fd78e5e7 (diff) | |
download | ydb-9052eb5cc304b8da8885fc4e3364ebddc16945f3.tar.gz |
Update libcxx to llvmorg-17.0.6
Update libcxx to llvmorg-17.0.6
c871ef572c71b4fef22d4a9e65bcebc57e625aea
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h index a2f2c0edde..fca420058d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h @@ -23,15 +23,15 @@ #include <__ranges/access.h> #include <__ranges/concepts.h> #include <__ranges/dangling.h> +#include <__type_traits/remove_reference.h> #include <__utility/forward.h> #include <__utility/move.h> -#include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif -#if _LIBCPP_STD_VER > 17 +#if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -39,33 +39,29 @@ namespace ranges { namespace __shuffle { struct __fn { - template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Gen> - requires permutable<_Iter> && uniform_random_bit_generator<remove_reference_t<_Gen>> - _LIBCPP_HIDE_FROM_ABI - _Iter operator()(_Iter __first, _Sent __last, _Gen&& __gen) const { + requires permutable<_Iter> && uniform_random_bit_generator<remove_reference_t<_Gen>> + _LIBCPP_HIDE_FROM_ABI _Iter operator()(_Iter __first, _Sent __last, _Gen&& __gen) const { _ClassicGenAdaptor<_Gen> __adapted_gen(__gen); return std::__shuffle<_RangeAlgPolicy>(std::move(__first), std::move(__last), __adapted_gen); } - template<random_access_range _Range, class _Gen> - requires permutable<iterator_t<_Range>> && uniform_random_bit_generator<remove_reference_t<_Gen>> - _LIBCPP_HIDE_FROM_ABI - borrowed_iterator_t<_Range> operator()(_Range&& __range, _Gen&& __gen) const { + template <random_access_range _Range, class _Gen> + requires permutable<iterator_t<_Range>> && uniform_random_bit_generator<remove_reference_t<_Gen>> + _LIBCPP_HIDE_FROM_ABI borrowed_iterator_t<_Range> operator()(_Range&& __range, _Gen&& __gen) const { return (*this)(ranges::begin(__range), ranges::end(__range), std::forward<_Gen>(__gen)); } - }; } // namespace __shuffle inline namespace __cpo { - inline constexpr auto shuffle = __shuffle::__fn{}; +inline constexpr auto shuffle = __shuffle::__fn{}; } // namespace __cpo } // namespace ranges _LIBCPP_END_NAMESPACE_STD -#endif // _LIBCPP_STD_VER > 17 +#endif // _LIBCPP_STD_VER >= 20 #endif // _LIBCPP___ALGORITHM_RANGES_SHUFFLE_H |