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

@ -13,8 +13,7 @@
#include <__config>
#include <__functional/binary_function.h>
#include <__functional/unary_function.h>
#include <__type_traits/integral_constant.h>
#include <__type_traits/predicate_traits.h>
#include <__type_traits/desugars_to.h>
#include <__utility/forward.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@ -30,27 +29,32 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS plus
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x + __y;}
struct _LIBCPP_TEMPLATE_VIS plus : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
return __x + __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(plus);
// The non-transparent std::plus specialization is only equivalent to a raw plus
// operator when we don't perform an implicit conversion when calling it.
template <class _Tp>
inline const bool __desugars_to_v<__plus_tag, plus<_Tp>, _Tp, _Tp> = true;
template <class _Tp, class _Up>
inline const bool __desugars_to_v<__plus_tag, plus<void>, _Tp, _Up> = true;
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS plus<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS plus<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) + std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) + std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) + std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
@ -59,27 +63,24 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS minus
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x - __y;}
struct _LIBCPP_TEMPLATE_VIS minus : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
return __x - __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(minus);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS minus<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS minus<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) - std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) - std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) - std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
@ -88,27 +89,24 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS multiplies
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x * __y;}
struct _LIBCPP_TEMPLATE_VIS multiplies : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
return __x * __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(multiplies);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS multiplies<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS multiplies<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) * std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) * std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) * std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
@ -117,27 +115,24 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS divides
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x / __y;}
struct _LIBCPP_TEMPLATE_VIS divides : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
return __x / __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(divides);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS divides<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS divides<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) / std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) / std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) / std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
@ -146,27 +141,24 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS modulus
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x % __y;}
struct _LIBCPP_TEMPLATE_VIS modulus : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
return __x % __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(modulus);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS modulus<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS modulus<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) % std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) % std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) % std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
@ -175,27 +167,22 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS negate
: __unary_function<_Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return -__x;}
struct _LIBCPP_TEMPLATE_VIS negate : __unary_function<_Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x) const { return -__x; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(negate);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS negate<void>
{
template <class _Tp>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_Tp&& __x) const
noexcept(noexcept(- _VSTD::forward<_Tp>(__x)))
-> decltype( - _VSTD::forward<_Tp>(__x))
{ return - _VSTD::forward<_Tp>(__x); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS negate<void> {
template <class _Tp>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
noexcept(noexcept(-std::forward<_Tp>(__x))) //
-> decltype(-std::forward<_Tp>(__x)) {
return -std::forward<_Tp>(__x);
}
typedef void is_transparent;
};
#endif
@ -206,51 +193,43 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS bit_and
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x & __y;}
struct _LIBCPP_TEMPLATE_VIS bit_and : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
return __x & __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_and);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS bit_and<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS bit_and<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) &
std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) & std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) & std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
struct _LIBCPP_TEMPLATE_VIS bit_not
: __unary_function<_Tp, _Tp>
{
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x) const
{return ~__x;}
struct _LIBCPP_TEMPLATE_VIS bit_not : __unary_function<_Tp, _Tp> {
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x) const { return ~__x; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_not);
template <>
struct _LIBCPP_TEMPLATE_VIS bit_not<void>
{
template <class _Tp>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_Tp&& __x) const
noexcept(noexcept(~_VSTD::forward<_Tp>(__x)))
-> decltype( ~_VSTD::forward<_Tp>(__x))
{ return ~_VSTD::forward<_Tp>(__x); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS bit_not<void> {
template <class _Tp>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
noexcept(noexcept(~std::forward<_Tp>(__x))) //
-> decltype(~std::forward<_Tp>(__x)) {
return ~std::forward<_Tp>(__x);
}
typedef void is_transparent;
};
#endif
@ -259,27 +238,24 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS bit_or
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x | __y;}
struct _LIBCPP_TEMPLATE_VIS bit_or : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
return __x | __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_or);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS bit_or<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS bit_or<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) | std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) | std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) | std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
@ -288,27 +264,24 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS bit_xor
: __binary_function<_Tp, _Tp, _Tp>
{
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
_Tp operator()(const _Tp& __x, const _Tp& __y) const
{return __x ^ __y;}
struct _LIBCPP_TEMPLATE_VIS bit_xor : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
return __x ^ __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_xor);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS bit_xor<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS bit_xor<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) ^ std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) ^ std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) ^ std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
@ -319,64 +292,59 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS equal_to
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x == __y;}
struct _LIBCPP_TEMPLATE_VIS equal_to : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
return __x == __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(equal_to);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS equal_to<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS equal_to<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) == std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) == std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) == std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
// The non-transparent std::equal_to specialization is only equivalent to a raw equality
// comparison when we don't perform an implicit conversion when calling it.
template <class _Tp>
struct __is_trivial_equality_predicate<equal_to<_Tp>, _Tp, _Tp> : true_type {};
inline const bool __desugars_to_v<__equal_tag, equal_to<_Tp>, _Tp, _Tp> = true;
#if _LIBCPP_STD_VER >= 14
template <class _Tp>
struct __is_trivial_equality_predicate<equal_to<>, _Tp, _Tp> : true_type {};
#endif
// In the transparent case, we do not enforce that
template <class _Tp, class _Up>
inline const bool __desugars_to_v<__equal_tag, equal_to<void>, _Tp, _Up> = true;
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS not_equal_to
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x != __y;}
struct _LIBCPP_TEMPLATE_VIS not_equal_to : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
return __x != __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(not_equal_to);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS not_equal_to<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS not_equal_to<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) != std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) != std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) != std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
@ -385,28 +353,31 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS less
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x < __y;}
struct _LIBCPP_TEMPLATE_VIS less : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
return __x < __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less);
template <class _Tp>
inline const bool __desugars_to_v<__less_tag, less<_Tp>, _Tp, _Tp> = true;
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS less<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS less<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) < std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) < std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) < std::forward<_T2>(__u);
}
typedef void is_transparent;
};
template <class _Tp>
inline const bool __desugars_to_v<__less_tag, less<>, _Tp, _Tp> = true;
#endif
#if _LIBCPP_STD_VER >= 14
@ -414,27 +385,24 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS less_equal
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x <= __y;}
struct _LIBCPP_TEMPLATE_VIS less_equal : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
return __x <= __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less_equal);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS less_equal<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS less_equal<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) <= std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) <= std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) <= std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
@ -443,27 +411,24 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS greater_equal
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x >= __y;}
struct _LIBCPP_TEMPLATE_VIS greater_equal : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
return __x >= __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater_equal);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS greater_equal<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS greater_equal<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) >=
std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) >= std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) >= std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
@ -472,27 +437,24 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS greater
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x > __y;}
struct _LIBCPP_TEMPLATE_VIS greater : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
return __x > __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS greater<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS greater<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) > std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) > std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) > std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
@ -503,27 +465,24 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS logical_and
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x && __y;}
struct _LIBCPP_TEMPLATE_VIS logical_and : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
return __x && __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_and);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS logical_and<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS logical_and<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) && std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) && std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) && std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif
@ -532,27 +491,22 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS logical_not
: __unary_function<_Tp, bool>
{
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x) const
{return !__x;}
struct _LIBCPP_TEMPLATE_VIS logical_not : __unary_function<_Tp, bool> {
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x) const { return !__x; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_not);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS logical_not<void>
{
template <class _Tp>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_Tp&& __x) const
noexcept(noexcept(!_VSTD::forward<_Tp>(__x)))
-> decltype( !_VSTD::forward<_Tp>(__x))
{ return !_VSTD::forward<_Tp>(__x); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS logical_not<void> {
template <class _Tp>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
noexcept(noexcept(!std::forward<_Tp>(__x))) //
-> decltype(!std::forward<_Tp>(__x)) {
return !std::forward<_Tp>(__x);
}
typedef void is_transparent;
};
#endif
@ -561,27 +515,24 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS logical_or
: __binary_function<_Tp, _Tp, bool>
{
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x || __y;}
struct _LIBCPP_TEMPLATE_VIS logical_or : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
return __x || __y;
}
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_or);
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS logical_or<void>
{
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(_VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u)))
-> decltype( _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u))
{ return _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
struct _LIBCPP_TEMPLATE_VIS logical_or<void> {
template <class _T1, class _T2>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) || std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) || std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) || std::forward<_T2>(__u);
}
typedef void is_transparent;
};
#endif