aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/__algorithm/ranges_set_intersection.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_set_intersection.h
parent2f3b605b2e159522ecab77fd518e8139aaf581e9 (diff)
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/ranges_set_intersection.h')
-rw-r--r--contrib/llvm-project/libcxx/include/__algorithm/ranges_set_intersection.h63
1 files changed, 27 insertions, 36 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/ranges_set_intersection.h b/contrib/llvm-project/libcxx/include/__algorithm/ranges_set_intersection.h
index aa9fd24ced09..4cdcbb75051a 100644
--- a/contrib/llvm-project/libcxx/include/__algorithm/ranges_set_intersection.h
+++ b/contrib/llvm-project/libcxx/include/__algorithm/ranges_set_intersection.h
@@ -28,7 +28,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17
+#if _LIBCPP_STD_VER >= 20
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -40,15 +40,14 @@ using set_intersection_result = in_in_out_result<_InIter1, _InIter2, _OutIter>;
namespace __set_intersection {
struct __fn {
- template <
- input_iterator _InIter1,
- sentinel_for<_InIter1> _Sent1,
- input_iterator _InIter2,
- sentinel_for<_InIter2> _Sent2,
- weakly_incrementable _OutIter,
- class _Comp = less,
- class _Proj1 = identity,
- class _Proj2 = identity>
+ template <input_iterator _InIter1,
+ sentinel_for<_InIter1> _Sent1,
+ input_iterator _InIter2,
+ sentinel_for<_InIter2> _Sent2,
+ weakly_incrementable _OutIter,
+ class _Comp = less,
+ class _Proj1 = identity,
+ class _Proj2 = identity>
requires mergeable<_InIter1, _InIter2, _OutIter, _Comp, _Proj1, _Proj2>
_LIBCPP_HIDE_FROM_ABI constexpr set_intersection_result<_InIter1, _InIter2, _OutIter> operator()(
_InIter1 __first1,
@@ -69,30 +68,22 @@ struct __fn {
return {std::move(__ret.__in1_), std::move(__ret.__in2_), std::move(__ret.__out_)};
}
- template <
- input_range _Range1,
- input_range _Range2,
- weakly_incrementable _OutIter,
- class _Comp = less,
- class _Proj1 = identity,
- class _Proj2 = identity>
- requires mergeable<
- iterator_t<_Range1>,
- iterator_t<_Range2>,
- _OutIter,
- _Comp,
- _Proj1,
- _Proj2>
- _LIBCPP_HIDE_FROM_ABI constexpr set_intersection_result<borrowed_iterator_t<_Range1>,
- borrowed_iterator_t<_Range2>,
- _OutIter>
- operator()(
- _Range1&& __range1,
- _Range2&& __range2,
- _OutIter __result,
- _Comp __comp = {},
- _Proj1 __proj1 = {},
- _Proj2 __proj2 = {}) const {
+ template <input_range _Range1,
+ input_range _Range2,
+ weakly_incrementable _OutIter,
+ class _Comp = less,
+ class _Proj1 = identity,
+ class _Proj2 = identity>
+ requires mergeable<iterator_t<_Range1>, iterator_t<_Range2>, _OutIter, _Comp, _Proj1, _Proj2>
+ _LIBCPP_HIDE_FROM_ABI constexpr set_intersection_result<borrowed_iterator_t<_Range1>,
+ borrowed_iterator_t<_Range2>,
+ _OutIter>
+ operator()(_Range1&& __range1,
+ _Range2&& __range2,
+ _OutIter __result,
+ _Comp __comp = {},
+ _Proj1 __proj1 = {},
+ _Proj2 __proj2 = {}) const {
auto __ret = std::__set_intersection<_RangeAlgPolicy>(
ranges::begin(__range1),
ranges::end(__range1),
@@ -107,11 +98,11 @@ struct __fn {
} // namespace __set_intersection
inline namespace __cpo {
- inline constexpr auto set_intersection = __set_intersection::__fn{};
+inline constexpr auto set_intersection = __set_intersection::__fn{};
} // namespace __cpo
} // namespace ranges
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCPP_STD_VER >= 20
#endif // _LIBCPP___ALGORITHM_RANGES_SET_INTERSECTION_H