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

@ -23,47 +23,42 @@ template <class _UIntType, _UIntType _Xp, size_t _Rp>
struct __log2_imp;
template <unsigned long long _Xp, size_t _Rp>
struct __log2_imp<unsigned long long, _Xp, _Rp>
{
static const size_t value = _Xp & ((unsigned long long)(1) << _Rp) ? _Rp
: __log2_imp<unsigned long long, _Xp, _Rp - 1>::value;
struct __log2_imp<unsigned long long, _Xp, _Rp> {
static const size_t value =
_Xp & ((unsigned long long)(1) << _Rp) ? _Rp : __log2_imp<unsigned long long, _Xp, _Rp - 1>::value;
};
template <unsigned long long _Xp>
struct __log2_imp<unsigned long long, _Xp, 0>
{
static const size_t value = 0;
struct __log2_imp<unsigned long long, _Xp, 0> {
static const size_t value = 0;
};
template <size_t _Rp>
struct __log2_imp<unsigned long long, 0, _Rp>
{
static const size_t value = _Rp + 1;
struct __log2_imp<unsigned long long, 0, _Rp> {
static const size_t value = _Rp + 1;
};
#ifndef _LIBCPP_HAS_NO_INT128
template <__uint128_t _Xp, size_t _Rp>
struct __log2_imp<__uint128_t, _Xp, _Rp>
{
static const size_t value = (_Xp >> 64)
? (64 + __log2_imp<unsigned long long, (_Xp >> 64), 63>::value)
: __log2_imp<unsigned long long, _Xp, 63>::value;
struct __log2_imp<__uint128_t, _Xp, _Rp> {
static const size_t value =
(_Xp >> 64) ? (64 + __log2_imp<unsigned long long, (_Xp >> 64), 63>::value)
: __log2_imp<unsigned long long, _Xp, 63>::value;
};
#endif // _LIBCPP_HAS_NO_INT128
template <class _UIntType, _UIntType _Xp>
struct __log2
{
static const size_t value = __log2_imp<
struct __log2 {
static const size_t value = __log2_imp<
#ifndef _LIBCPP_HAS_NO_INT128
__conditional_t<sizeof(_UIntType) <= sizeof(unsigned long long), unsigned long long, __uint128_t>,
__conditional_t<sizeof(_UIntType) <= sizeof(unsigned long long), unsigned long long, __uint128_t>,
#else
unsigned long long,
unsigned long long,
#endif // _LIBCPP_HAS_NO_INT128
_Xp,
sizeof(_UIntType) * __CHAR_BIT__ - 1>::value;
_Xp,
sizeof(_UIntType) * __CHAR_BIT__ - 1>::value;
};
_LIBCPP_END_NAMESPACE_STD