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

@ -33,7 +33,6 @@ Types:
*/
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
#include <__type_traits/enable_if.h>
#include <__type_traits/integral_constant.h>
@ -67,77 +66,65 @@ using ::max_align_t _LIBCPP_USING_IF_EXISTS;
_LIBCPP_END_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 17
namespace std // purposefully not versioned
namespace std // purposefully not versioned
{
enum class byte : unsigned char {};
_LIBCPP_HIDE_FROM_ABI constexpr byte operator| (byte __lhs, byte __rhs) noexcept
{
return static_cast<byte>(
static_cast<unsigned char>(
static_cast<unsigned int>(__lhs) | static_cast<unsigned int>(__rhs)
));
_LIBCPP_HIDE_FROM_ABI inline constexpr byte operator|(byte __lhs, byte __rhs) noexcept {
return static_cast<byte>(
static_cast<unsigned char>(static_cast<unsigned int>(__lhs) | static_cast<unsigned int>(__rhs)));
}
_LIBCPP_HIDE_FROM_ABI constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept
{ return __lhs = __lhs | __rhs; }
_LIBCPP_HIDE_FROM_ABI constexpr byte operator& (byte __lhs, byte __rhs) noexcept
{
return static_cast<byte>(
static_cast<unsigned char>(
static_cast<unsigned int>(__lhs) & static_cast<unsigned int>(__rhs)
));
_LIBCPP_HIDE_FROM_ABI inline constexpr byte& operator|=(byte& __lhs, byte __rhs) noexcept {
return __lhs = __lhs | __rhs;
}
_LIBCPP_HIDE_FROM_ABI constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept
{ return __lhs = __lhs & __rhs; }
_LIBCPP_HIDE_FROM_ABI constexpr byte operator^ (byte __lhs, byte __rhs) noexcept
{
return static_cast<byte>(
static_cast<unsigned char>(
static_cast<unsigned int>(__lhs) ^ static_cast<unsigned int>(__rhs)
));
_LIBCPP_HIDE_FROM_ABI inline constexpr byte operator&(byte __lhs, byte __rhs) noexcept {
return static_cast<byte>(
static_cast<unsigned char>(static_cast<unsigned int>(__lhs) & static_cast<unsigned int>(__rhs)));
}
_LIBCPP_HIDE_FROM_ABI constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept
{ return __lhs = __lhs ^ __rhs; }
_LIBCPP_HIDE_FROM_ABI constexpr byte operator~ (byte __b) noexcept
{
return static_cast<byte>(
static_cast<unsigned char>(
~static_cast<unsigned int>(__b)
));
_LIBCPP_HIDE_FROM_ABI inline constexpr byte& operator&=(byte& __lhs, byte __rhs) noexcept {
return __lhs = __lhs & __rhs;
}
template <class _Tp>
using _EnableByteOverload = __enable_if_t<is_integral<_Tp>::value, byte>;
_LIBCPP_HIDE_FROM_ABI inline constexpr byte operator^(byte __lhs, byte __rhs) noexcept {
return static_cast<byte>(
static_cast<unsigned char>(static_cast<unsigned int>(__lhs) ^ static_cast<unsigned int>(__rhs)));
}
template <class _Integer>
_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer> &
operator<<=(byte& __lhs, _Integer __shift) noexcept
{ return __lhs = __lhs << __shift; }
_LIBCPP_HIDE_FROM_ABI inline constexpr byte& operator^=(byte& __lhs, byte __rhs) noexcept {
return __lhs = __lhs ^ __rhs;
}
template <class _Integer>
_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer>
operator<< (byte __lhs, _Integer __shift) noexcept
{ return static_cast<byte>(static_cast<unsigned char>(static_cast<unsigned int>(__lhs) << __shift)); }
_LIBCPP_HIDE_FROM_ABI inline constexpr byte operator~(byte __b) noexcept {
return static_cast<byte>(static_cast<unsigned char>(~static_cast<unsigned int>(__b)));
}
template <class _Integer>
_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer> &
operator>>=(byte& __lhs, _Integer __shift) noexcept
{ return __lhs = __lhs >> __shift; }
template <class _Integer, __enable_if_t<is_integral<_Integer>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr byte& operator<<=(byte& __lhs, _Integer __shift) noexcept {
return __lhs = __lhs << __shift;
}
template <class _Integer>
_LIBCPP_HIDE_FROM_ABI constexpr _EnableByteOverload<_Integer>
operator>> (byte __lhs, _Integer __shift) noexcept
{ return static_cast<byte>(static_cast<unsigned char>(static_cast<unsigned int>(__lhs) >> __shift)); }
template <class _Integer, __enable_if_t<is_integral<_Integer>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr byte operator<<(byte __lhs, _Integer __shift) noexcept {
return static_cast<byte>(static_cast<unsigned char>(static_cast<unsigned int>(__lhs) << __shift));
}
template <class _Integer, class = _EnableByteOverload<_Integer> >
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Integer
to_integer(byte __b) noexcept { return static_cast<_Integer>(__b); }
template <class _Integer, __enable_if_t<is_integral<_Integer>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr byte& operator>>=(byte& __lhs, _Integer __shift) noexcept {
return __lhs = __lhs >> __shift;
}
template <class _Integer, __enable_if_t<is_integral<_Integer>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr byte operator>>(byte __lhs, _Integer __shift) noexcept {
return static_cast<byte>(static_cast<unsigned char>(static_cast<unsigned int>(__lhs) >> __shift));
}
template <class _Integer, __enable_if_t<is_integral<_Integer>::value, int> = 0>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Integer to_integer(byte __b) noexcept {
return static_cast<_Integer>(__b);
}
} // namespace std