aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/__algorithm/ranges_swap_ranges.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-09-02 21:17:18 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-01-07 17:46:17 +0000
commitfe013be447cd855ccaf6094a1d06aea570450629 (patch)
tree9adc1e0a5d25b6280995832bb29d592fb80554a6 /contrib/llvm-project/libcxx/include/__algorithm/ranges_swap_ranges.h
parent2f3b605b2e159522ecab77fd518e8139aaf581e9 (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.h15
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