mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-04 19:52:28 +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
15
third_party/libcxx/__algorithm/ranges_fill.h
vendored
15
third_party/libcxx/__algorithm/ranges_fill.h
vendored
|
@ -20,6 +20,9 @@
|
|||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_PUSH_MACROS
|
||||
#include <__undef_macros>
|
||||
|
||||
#if _LIBCPP_STD_VER >= 20
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
@ -28,9 +31,8 @@ namespace ranges {
|
|||
namespace __fill {
|
||||
struct __fn {
|
||||
template <class _Type, output_iterator<const _Type&> _Iter, sentinel_for<_Iter> _Sent>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr
|
||||
_Iter operator()(_Iter __first, _Sent __last, const _Type& __value) const {
|
||||
if constexpr(random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>) {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr _Iter operator()(_Iter __first, _Sent __last, const _Type& __value) const {
|
||||
if constexpr (random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>) {
|
||||
return ranges::fill_n(__first, __last - __first, __value);
|
||||
} else {
|
||||
for (; __first != __last; ++__first)
|
||||
|
@ -40,15 +42,14 @@ struct __fn {
|
|||
}
|
||||
|
||||
template <class _Type, output_range<const _Type&> _Range>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr
|
||||
borrowed_iterator_t<_Range> operator()(_Range&& __range, const _Type& __value) const {
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range> operator()(_Range&& __range, const _Type& __value) const {
|
||||
return (*this)(ranges::begin(__range), ranges::end(__range), __value);
|
||||
}
|
||||
};
|
||||
} // namespace __fill
|
||||
|
||||
inline namespace __cpo {
|
||||
inline constexpr auto fill = __fill::__fn{};
|
||||
inline constexpr auto fill = __fill::__fn{};
|
||||
} // namespace __cpo
|
||||
} // namespace ranges
|
||||
|
||||
|
@ -56,4 +57,6 @@ _LIBCPP_END_NAMESPACE_STD
|
|||
|
||||
#endif // _LIBCPP_STD_VER >= 20
|
||||
|
||||
_LIBCPP_POP_MACROS
|
||||
|
||||
#endif // _LIBCPP___ALGORITHM_RANGES_FILL_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue