mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-03 19:22: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
58
third_party/libcxx/__ranges/all.h
vendored
58
third_party/libcxx/__ranges/all.h
vendored
|
@ -11,6 +11,8 @@
|
|||
#define _LIBCPP___RANGES_ALL_H
|
||||
|
||||
#include <__config>
|
||||
#include <__functional/compose.h> // TODO(modules): Those should not be required
|
||||
#include <__functional/perfect_forward.h> //
|
||||
#include <__iterator/concepts.h>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <__ranges/access.h>
|
||||
|
@ -34,45 +36,37 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
namespace ranges::views {
|
||||
|
||||
namespace __all {
|
||||
struct __fn : __range_adaptor_closure<__fn> {
|
||||
template<class _Tp>
|
||||
requires ranges::view<decay_t<_Tp>>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI
|
||||
constexpr auto operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t))))
|
||||
-> decltype(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t)))
|
||||
{
|
||||
return _LIBCPP_AUTO_CAST(std::forward<_Tp>(__t));
|
||||
}
|
||||
struct __fn : __range_adaptor_closure<__fn> {
|
||||
template <class _Tp>
|
||||
requires ranges::view<decay_t<_Tp>>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept(
|
||||
noexcept(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t)))) -> decltype(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t))) {
|
||||
return _LIBCPP_AUTO_CAST(std::forward<_Tp>(__t));
|
||||
}
|
||||
|
||||
template<class _Tp>
|
||||
requires (!ranges::view<decay_t<_Tp>>) &&
|
||||
requires (_Tp&& __t) { ranges::ref_view{std::forward<_Tp>(__t)}; }
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI
|
||||
constexpr auto operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(ranges::ref_view{std::forward<_Tp>(__t)}))
|
||||
{
|
||||
return ranges::ref_view{std::forward<_Tp>(__t)};
|
||||
}
|
||||
template <class _Tp>
|
||||
requires(!ranges::view<decay_t<_Tp>>) && requires(_Tp&& __t) { ranges::ref_view{std::forward<_Tp>(__t)}; }
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(ranges::ref_view{std::forward<_Tp>(__t)})) {
|
||||
return ranges::ref_view{std::forward<_Tp>(__t)};
|
||||
}
|
||||
|
||||
template<class _Tp>
|
||||
requires (!ranges::view<decay_t<_Tp>> &&
|
||||
!requires (_Tp&& __t) { ranges::ref_view{std::forward<_Tp>(__t)}; } &&
|
||||
requires (_Tp&& __t) { ranges::owning_view{std::forward<_Tp>(__t)}; })
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI
|
||||
constexpr auto operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(ranges::owning_view{std::forward<_Tp>(__t)}))
|
||||
{
|
||||
return ranges::owning_view{std::forward<_Tp>(__t)};
|
||||
}
|
||||
};
|
||||
template <class _Tp>
|
||||
requires(
|
||||
!ranges::view<decay_t<_Tp>> && !requires(_Tp&& __t) { ranges::ref_view{std::forward<_Tp>(__t)}; } &&
|
||||
requires(_Tp&& __t) { ranges::owning_view{std::forward<_Tp>(__t)}; })
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(ranges::owning_view{std::forward<_Tp>(__t)})) {
|
||||
return ranges::owning_view{std::forward<_Tp>(__t)};
|
||||
}
|
||||
};
|
||||
} // namespace __all
|
||||
|
||||
inline namespace __cpo {
|
||||
inline constexpr auto all = __all::__fn{};
|
||||
inline constexpr auto all = __all::__fn{};
|
||||
} // namespace __cpo
|
||||
|
||||
template<ranges::viewable_range _Range>
|
||||
template <ranges::viewable_range _Range>
|
||||
using all_t = decltype(views::all(std::declval<_Range>()));
|
||||
|
||||
} // namespace ranges::views
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue