mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-03 11:12:27 +00:00
Release Cosmopolitan v3.6.0
This release is an atomic upgrade to GCC 14.1.0 with C23 and C++23
This commit is contained in:
parent
62ace3623a
commit
5660ec4741
1585 changed files with 117353 additions and 271644 deletions
19
third_party/libcxx/__algorithm/ranges_find.h
vendored
19
third_party/libcxx/__algorithm/ranges_find.h
vendored
|
@ -28,6 +28,9 @@
|
|||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_PUSH_MACROS
|
||||
#include <__undef_macros>
|
||||
|
||||
#if _LIBCPP_STD_VER >= 20
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
@ -41,30 +44,30 @@ struct __fn {
|
|||
if constexpr (forward_iterator<_Iter>) {
|
||||
auto [__first_un, __last_un] = std::__unwrap_range(__first, std::move(__last));
|
||||
return std::__rewrap_range<_Sent>(
|
||||
std::move(__first), std::__find_impl(std::move(__first_un), std::move(__last_un), __value, __proj));
|
||||
std::move(__first), std::__find(std::move(__first_un), std::move(__last_un), __value, __proj));
|
||||
} else {
|
||||
return std::__find_impl(std::move(__first), std::move(__last), __value, __proj);
|
||||
return std::__find(std::move(__first), std::move(__last), __value, __proj);
|
||||
}
|
||||
}
|
||||
|
||||
template <input_iterator _Ip, sentinel_for<_Ip> _Sp, class _Tp, class _Proj = identity>
|
||||
requires indirect_binary_predicate<ranges::equal_to, projected<_Ip, _Proj>, const _Tp*>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
|
||||
_Ip operator()(_Ip __first, _Sp __last, const _Tp& __value, _Proj __proj = {}) const {
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip
|
||||
operator()(_Ip __first, _Sp __last, const _Tp& __value, _Proj __proj = {}) const {
|
||||
return __find_unwrap(std::move(__first), std::move(__last), __value, __proj);
|
||||
}
|
||||
|
||||
template <input_range _Rp, class _Tp, class _Proj = identity>
|
||||
requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Rp>, _Proj>, const _Tp*>
|
||||
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr
|
||||
borrowed_iterator_t<_Rp> operator()(_Rp&& __r, const _Tp& __value, _Proj __proj = {}) const {
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Rp>
|
||||
operator()(_Rp&& __r, const _Tp& __value, _Proj __proj = {}) const {
|
||||
return __find_unwrap(ranges::begin(__r), ranges::end(__r), __value, __proj);
|
||||
}
|
||||
};
|
||||
} // namespace __find
|
||||
|
||||
inline namespace __cpo {
|
||||
inline constexpr auto find = __find::__fn{};
|
||||
inline constexpr auto find = __find::__fn{};
|
||||
} // namespace __cpo
|
||||
} // namespace ranges
|
||||
|
||||
|
@ -72,4 +75,6 @@ _LIBCPP_END_NAMESPACE_STD
|
|||
|
||||
#endif // _LIBCPP_STD_VER >= 20
|
||||
|
||||
_LIBCPP_POP_MACROS
|
||||
|
||||
#endif // _LIBCPP___ALGORITHM_RANGES_FIND_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue