diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-09-02 21:17:18 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-12-08 17:34:50 +0000 |
commit | 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e (patch) | |
tree | 62f873df87c7c675557a179e0c4c83fe9f3087bc /contrib/llvm-project/libcxx/include/__algorithm/ranges_swap_ranges.h | |
parent | cf037972ea8863e2bab7461d77345367d2c1e054 (diff) | |
parent | 7fa27ce4a07f19b07799a767fc29416f3b625afb (diff) |
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/ranges_swap_ranges.h')
-rw-r--r-- | contrib/llvm-project/libcxx/include/__algorithm/ranges_swap_ranges.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/ranges_swap_ranges.h b/contrib/llvm-project/libcxx/include/__algorithm/ranges_swap_ranges.h index 552fd55ff88f..1d0ebc0d5221 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/ranges_swap_ranges.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/ranges_swap_ranges.h @@ -24,7 +24,7 @@ # pragma GCC system_header #endif -#if _LIBCPP_STD_VER > 17 +#if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -35,8 +35,7 @@ using swap_ranges_result = in_in_result<_I1, _I2>; namespace __swap_ranges { struct __fn { - template <input_iterator _I1, sentinel_for<_I1> _S1, - input_iterator _I2, sentinel_for<_I2> _S2> + template <input_iterator _I1, sentinel_for<_I1> _S1, input_iterator _I2, sentinel_for<_I2> _S2> requires indirectly_swappable<_I1, _I2> _LIBCPP_HIDE_FROM_ABI constexpr swap_ranges_result<_I1, _I2> operator()(_I1 __first1, _S1 __last1, _I2 __first2, _S2 __last2) const { @@ -47,22 +46,20 @@ struct __fn { template <input_range _R1, input_range _R2> requires indirectly_swappable<iterator_t<_R1>, iterator_t<_R2>> - _LIBCPP_HIDE_FROM_ABI constexpr - swap_ranges_result<borrowed_iterator_t<_R1>, borrowed_iterator_t<_R2>> + _LIBCPP_HIDE_FROM_ABI constexpr swap_ranges_result<borrowed_iterator_t<_R1>, borrowed_iterator_t<_R2>> operator()(_R1&& __r1, _R2&& __r2) const { - return operator()(ranges::begin(__r1), ranges::end(__r1), - ranges::begin(__r2), ranges::end(__r2)); + return operator()(ranges::begin(__r1), ranges::end(__r1), ranges::begin(__r2), ranges::end(__r2)); } }; } // namespace __swap_ranges inline namespace __cpo { - inline constexpr auto swap_ranges = __swap_ranges::__fn{}; +inline constexpr auto swap_ranges = __swap_ranges::__fn{}; } // namespace __cpo } // namespace ranges _LIBCPP_END_NAMESPACE_STD -#endif // _LIBCPP_STD_VER > 17 +#endif // _LIBCPP_STD_VER >= 20 #endif // _LIBCPP___ALGORITHM_RANGES_SWAP_RANGES_H |