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:
Justine Tunney 2024-07-23 03:16:17 -07:00
parent 62ace3623a
commit 5660ec4741
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
1585 changed files with 117353 additions and 271644 deletions

View file

@ -17,7 +17,6 @@
#include <__type_traits/decay.h>
#include <__type_traits/enable_if.h>
#include <__type_traits/is_constructible.h>
#include <__type_traits/is_move_constructible.h>
#include <__utility/forward.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@ -29,30 +28,23 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
struct __bind_front_op {
template <class ..._Args>
_LIBCPP_HIDE_FROM_ABI
constexpr auto operator()(_Args&& ...__args) const
noexcept(noexcept(_VSTD::invoke(_VSTD::forward<_Args>(__args)...)))
-> decltype( _VSTD::invoke(_VSTD::forward<_Args>(__args)...))
{ return _VSTD::invoke(_VSTD::forward<_Args>(__args)...); }
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const noexcept(
noexcept(std::invoke(std::forward<_Args>(__args)...))) -> decltype(std::invoke(std::forward<_Args>(__args)...)) {
return std::invoke(std::forward<_Args>(__args)...);
}
};
template <class _Fn, class ..._BoundArgs>
template <class _Fn, class... _BoundArgs>
struct __bind_front_t : __perfect_forward<__bind_front_op, _Fn, _BoundArgs...> {
using __perfect_forward<__bind_front_op, _Fn, _BoundArgs...>::__perfect_forward;
using __perfect_forward<__bind_front_op, _Fn, _BoundArgs...>::__perfect_forward;
};
template <class _Fn, class... _Args, class = enable_if_t<
_And<
is_constructible<decay_t<_Fn>, _Fn>,
is_move_constructible<decay_t<_Fn>>,
is_constructible<decay_t<_Args>, _Args>...,
is_move_constructible<decay_t<_Args>>...
>::value
>>
_LIBCPP_HIDE_FROM_ABI
constexpr auto bind_front(_Fn&& __f, _Args&&... __args) {
return __bind_front_t<decay_t<_Fn>, decay_t<_Args>...>(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)...);
template <class _Fn, class... _Args>
requires is_constructible_v<decay_t<_Fn>, _Fn> && is_move_constructible_v<decay_t<_Fn>> &&
(is_constructible_v<decay_t<_Args>, _Args> && ...) && (is_move_constructible_v<decay_t<_Args>> && ...)
_LIBCPP_HIDE_FROM_ABI constexpr auto bind_front(_Fn&& __f, _Args&&... __args) {
return __bind_front_t<decay_t<_Fn>, decay_t<_Args>...>(std::forward<_Fn>(__f), std::forward<_Args>(__args)...);
}
#endif // _LIBCPP_STD_VER >= 20