mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-10-08 13:51:38 +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
84
third_party/libcxx/__ranges/data.h
vendored
84
third_party/libcxx/__ranges/data.h
vendored
|
@ -36,44 +36,35 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
namespace ranges {
|
||||
namespace __data {
|
||||
template <class _Tp>
|
||||
concept __ptr_to_object = is_pointer_v<_Tp> && is_object_v<remove_pointer_t<_Tp>>;
|
||||
template <class _Tp>
|
||||
concept __ptr_to_object = is_pointer_v<_Tp> && is_object_v<remove_pointer_t<_Tp>>;
|
||||
|
||||
template <class _Tp>
|
||||
concept __member_data =
|
||||
__can_borrow<_Tp> &&
|
||||
__workaround_52970<_Tp> &&
|
||||
requires(_Tp&& __t) {
|
||||
{ _LIBCPP_AUTO_CAST(__t.data()) } -> __ptr_to_object;
|
||||
};
|
||||
template <class _Tp>
|
||||
concept __member_data = __can_borrow<_Tp> && requires(_Tp&& __t) {
|
||||
{ _LIBCPP_AUTO_CAST(__t.data()) } -> __ptr_to_object;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
concept __ranges_begin_invocable =
|
||||
!__member_data<_Tp> &&
|
||||
__can_borrow<_Tp> &&
|
||||
requires(_Tp&& __t) {
|
||||
{ ranges::begin(__t) } -> contiguous_iterator;
|
||||
};
|
||||
template <class _Tp>
|
||||
concept __ranges_begin_invocable = !__member_data<_Tp> && __can_borrow<_Tp> && requires(_Tp&& __t) {
|
||||
{ ranges::begin(__t) } -> contiguous_iterator;
|
||||
};
|
||||
|
||||
struct __fn {
|
||||
template <__member_data _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
constexpr auto operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(__t.data())) {
|
||||
return __t.data();
|
||||
}
|
||||
struct __fn {
|
||||
template <__member_data _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept(noexcept(__t.data())) {
|
||||
return __t.data();
|
||||
}
|
||||
|
||||
template<__ranges_begin_invocable _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI
|
||||
constexpr auto operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(std::to_address(ranges::begin(__t)))) {
|
||||
return std::to_address(ranges::begin(__t));
|
||||
}
|
||||
};
|
||||
template <__ranges_begin_invocable _Tp>
|
||||
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(std::to_address(ranges::begin(__t)))) {
|
||||
return std::to_address(ranges::begin(__t));
|
||||
}
|
||||
};
|
||||
} // namespace __data
|
||||
|
||||
inline namespace __cpo {
|
||||
inline constexpr auto data = __data::__fn{};
|
||||
inline constexpr auto data = __data::__fn{};
|
||||
} // namespace __cpo
|
||||
} // namespace ranges
|
||||
|
||||
|
@ -81,27 +72,26 @@ inline namespace __cpo {
|
|||
|
||||
namespace ranges {
|
||||
namespace __cdata {
|
||||
struct __fn {
|
||||
template <class _Tp>
|
||||
requires is_lvalue_reference_v<_Tp&&>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI
|
||||
constexpr auto operator()(_Tp&& __t) const
|
||||
struct __fn {
|
||||
template <class _Tp>
|
||||
requires is_lvalue_reference_v<_Tp&&>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(ranges::data(static_cast<const remove_reference_t<_Tp>&>(__t))))
|
||||
-> decltype( ranges::data(static_cast<const remove_reference_t<_Tp>&>(__t)))
|
||||
{ return ranges::data(static_cast<const remove_reference_t<_Tp>&>(__t)); }
|
||||
-> decltype(ranges::data(static_cast<const remove_reference_t<_Tp>&>(__t))) {
|
||||
return ranges::data(static_cast<const remove_reference_t<_Tp>&>(__t));
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
requires is_rvalue_reference_v<_Tp&&>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI
|
||||
constexpr auto operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(ranges::data(static_cast<const _Tp&&>(__t))))
|
||||
-> decltype( ranges::data(static_cast<const _Tp&&>(__t)))
|
||||
{ return ranges::data(static_cast<const _Tp&&>(__t)); }
|
||||
};
|
||||
template <class _Tp>
|
||||
requires is_rvalue_reference_v<_Tp&&>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept(
|
||||
noexcept(ranges::data(static_cast<const _Tp&&>(__t)))) -> decltype(ranges::data(static_cast<const _Tp&&>(__t))) {
|
||||
return ranges::data(static_cast<const _Tp&&>(__t));
|
||||
}
|
||||
};
|
||||
} // namespace __cdata
|
||||
|
||||
inline namespace __cpo {
|
||||
inline constexpr auto cdata = __cdata::__fn{};
|
||||
inline constexpr auto cdata = __cdata::__fn{};
|
||||
} // namespace __cpo
|
||||
} // namespace ranges
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue