aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/__algorithm/ranges_search.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/__algorithm/ranges_search.h')
-rw-r--r--libcxx/include/__algorithm/ranges_search.h39
1 files changed, 19 insertions, 20 deletions
diff --git a/libcxx/include/__algorithm/ranges_search.h b/libcxx/include/__algorithm/ranges_search.h
index 388d5afa499d..ca2326e9ab27 100644
--- a/libcxx/include/__algorithm/ranges_search.h
+++ b/libcxx/include/__algorithm/ranges_search.h
@@ -28,7 +28,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17
+#if _LIBCPP_STD_VER >= 20
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -69,33 +69,33 @@ struct __fn {
return {__ret.first, __ret.second};
}
- template <forward_iterator _Iter1, sentinel_for<_Iter1> _Sent1,
- forward_iterator _Iter2, sentinel_for<_Iter2> _Sent2,
- class _Pred = ranges::equal_to,
+ template <forward_iterator _Iter1,
+ sentinel_for<_Iter1> _Sent1,
+ forward_iterator _Iter2,
+ sentinel_for<_Iter2> _Sent2,
+ class _Pred = ranges::equal_to,
class _Proj1 = identity,
class _Proj2 = identity>
requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
- _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
- subrange<_Iter1> operator()(_Iter1 __first1, _Sent1 __last1,
- _Iter2 __first2, _Sent2 __last2,
- _Pred __pred = {},
- _Proj1 __proj1 = {},
- _Proj2 __proj2 = {}) const {
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter1> operator()(
+ _Iter1 __first1,
+ _Sent1 __last1,
+ _Iter2 __first2,
+ _Sent2 __last2,
+ _Pred __pred = {},
+ _Proj1 __proj1 = {},
+ _Proj2 __proj2 = {}) const {
return __ranges_search_impl(__first1, __last1, __first2, __last2, __pred, __proj1, __proj2);
}
template <forward_range _Range1,
forward_range _Range2,
- class _Pred = ranges::equal_to,
+ class _Pred = ranges::equal_to,
class _Proj1 = identity,
class _Proj2 = identity>
requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
- _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
- borrowed_subrange_t<_Range1> operator()(_Range1&& __range1,
- _Range2&& __range2,
- _Pred __pred = {},
- _Proj1 __proj1 = {},
- _Proj2 __proj2 = {}) const {
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range1> operator()(
+ _Range1&& __range1, _Range2&& __range2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
auto __first1 = ranges::begin(__range1);
if constexpr (sized_range<_Range2>) {
auto __size2 = ranges::size(__range2);
@@ -119,17 +119,16 @@ struct __fn {
__proj1,
__proj2);
}
-
};
} // namespace __search
inline namespace __cpo {
- inline constexpr auto search = __search::__fn{};
+inline constexpr auto search = __search::__fn{};
} // namespace __cpo
} // namespace ranges
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCPP_STD_VER >= 20
#endif // _LIBCPP___ALGORITHM_RANGES_SEARCH_H