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
14
third_party/libcxx/__algorithm/unwrap_range.h
vendored
14
third_party/libcxx/__algorithm/unwrap_range.h
vendored
|
@ -22,6 +22,9 @@
|
|||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_PUSH_MACROS
|
||||
#include <__undef_macros>
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
// __unwrap_range and __rewrap_range are used to unwrap ranges which may have different iterator and sentinel types.
|
||||
|
@ -50,7 +53,7 @@ struct __unwrap_range_impl {
|
|||
}
|
||||
|
||||
_LIBCPP_HIDE_FROM_ABI static constexpr auto __rewrap(const _Iter&, _Iter __iter)
|
||||
requires (!(random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>))
|
||||
requires(!(random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>))
|
||||
{
|
||||
return __iter;
|
||||
}
|
||||
|
@ -73,10 +76,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr auto __unwrap_range(_Iter __first, _Sent __last)
|
|||
return __unwrap_range_impl<_Iter, _Sent>::__unwrap(std::move(__first), std::move(__last));
|
||||
}
|
||||
|
||||
template <
|
||||
class _Sent,
|
||||
class _Iter,
|
||||
class _Unwrapped = decltype(std::__unwrap_range(std::declval<_Iter>(), std::declval<_Sent>()))>
|
||||
template < class _Sent, class _Iter, class _Unwrapped>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
|
||||
return __unwrap_range_impl<_Iter, _Sent>::__rewrap(std::move(__orig_iter), std::move(__iter));
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR pair<_Unwrapped, _Unwrapped> __unwrap_ra
|
|||
return std::make_pair(std::__unwrap_iter(std::move(__first)), std::__unwrap_iter(std::move(__last)));
|
||||
}
|
||||
|
||||
template <class _Iter, class _Unwrapped = decltype(std::__unwrap_iter(std::declval<_Iter>()))>
|
||||
template <class _Iter, class _Unwrapped>
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
|
||||
return std::__rewrap_iter(std::move(__orig_iter), std::move(__iter));
|
||||
}
|
||||
|
@ -94,4 +94,6 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap_range(_Iter __orig_iter,
|
|||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
_LIBCPP_POP_MACROS
|
||||
|
||||
#endif // _LIBCPP___ALGORITHM_UNWRAP_RANGE_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue