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
61
third_party/libcxx/__ranges/empty.h
vendored
61
third_party/libcxx/__ranges/empty.h
vendored
|
@ -28,50 +28,39 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||
|
||||
namespace ranges {
|
||||
namespace __empty {
|
||||
template <class _Tp>
|
||||
concept __member_empty =
|
||||
__workaround_52970<_Tp> &&
|
||||
requires(_Tp&& __t) {
|
||||
bool(__t.empty());
|
||||
};
|
||||
template <class _Tp>
|
||||
concept __member_empty = requires(_Tp&& __t) { bool(__t.empty()); };
|
||||
|
||||
template<class _Tp>
|
||||
concept __can_invoke_size =
|
||||
!__member_empty<_Tp> &&
|
||||
requires(_Tp&& __t) { ranges::size(__t); };
|
||||
template <class _Tp>
|
||||
concept __can_invoke_size = !__member_empty<_Tp> && requires(_Tp&& __t) { ranges::size(__t); };
|
||||
|
||||
template <class _Tp>
|
||||
concept __can_compare_begin_end =
|
||||
!__member_empty<_Tp> &&
|
||||
!__can_invoke_size<_Tp> &&
|
||||
requires(_Tp&& __t) {
|
||||
bool(ranges::begin(__t) == ranges::end(__t));
|
||||
{ ranges::begin(__t) } -> forward_iterator;
|
||||
};
|
||||
template <class _Tp>
|
||||
concept __can_compare_begin_end = !__member_empty<_Tp> && !__can_invoke_size<_Tp> && requires(_Tp&& __t) {
|
||||
bool(ranges::begin(__t) == ranges::end(__t));
|
||||
{ ranges::begin(__t) } -> forward_iterator;
|
||||
};
|
||||
|
||||
struct __fn {
|
||||
template <__member_empty _Tp>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(bool(__t.empty()))) {
|
||||
return bool(__t.empty());
|
||||
}
|
||||
struct __fn {
|
||||
template <__member_empty _Tp>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const noexcept(noexcept(bool(__t.empty()))) {
|
||||
return bool(__t.empty());
|
||||
}
|
||||
|
||||
template <__can_invoke_size _Tp>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(ranges::size(__t))) {
|
||||
return ranges::size(__t) == 0;
|
||||
}
|
||||
template <__can_invoke_size _Tp>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const noexcept(noexcept(ranges::size(__t))) {
|
||||
return ranges::size(__t) == 0;
|
||||
}
|
||||
|
||||
template<__can_compare_begin_end _Tp>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(bool(ranges::begin(__t) == ranges::end(__t)))) {
|
||||
return ranges::begin(__t) == ranges::end(__t);
|
||||
}
|
||||
};
|
||||
template <__can_compare_begin_end _Tp>
|
||||
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const
|
||||
noexcept(noexcept(bool(ranges::begin(__t) == ranges::end(__t)))) {
|
||||
return ranges::begin(__t) == ranges::end(__t);
|
||||
}
|
||||
};
|
||||
} // namespace __empty
|
||||
|
||||
inline namespace __cpo {
|
||||
inline constexpr auto empty = __empty::__fn{};
|
||||
inline constexpr auto empty = __empty::__fn{};
|
||||
} // namespace __cpo
|
||||
} // namespace ranges
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue