Revert "libcxx-compat: revert llvmorg-19-init-17728-g30cc12cd818d:"
This reverts commit 198b947ebc6834eade6acc52c5441a38693b8822, in preparation for merging llvm 21. PR: 292067 MFC after: 1 month
This commit is contained in:
@@ -34,7 +34,7 @@ inline constexpr bool is_fundamental_v = __is_fundamental(_Tp);
|
|||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
struct _LIBCPP_TEMPLATE_VIS is_fundamental
|
struct _LIBCPP_TEMPLATE_VIS is_fundamental
|
||||||
: public integral_constant<bool, is_void<_Tp>::value || __is_nullptr_t<_Tp>::value || is_arithmetic<_Tp>::value> {};
|
: public integral_constant<bool, is_void<_Tp>::value || __is_null_pointer_v<_Tp> || is_arithmetic<_Tp>::value> {};
|
||||||
|
|
||||||
# if _LIBCPP_STD_VER >= 17
|
# if _LIBCPP_STD_VER >= 17
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#include <__config>
|
#include <__config>
|
||||||
#include <__type_traits/integral_constant.h>
|
#include <__type_traits/integral_constant.h>
|
||||||
#include <__type_traits/remove_cv.h>
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||||
@@ -21,20 +20,15 @@
|
|||||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
struct __is_nullptr_t_impl : public false_type {};
|
inline const bool __is_null_pointer_v = __is_same(__remove_cv(_Tp), nullptr_t);
|
||||||
template <>
|
|
||||||
struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
|
|
||||||
|
|
||||||
template <class _Tp>
|
|
||||||
struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {};
|
|
||||||
|
|
||||||
#if _LIBCPP_STD_VER >= 14
|
#if _LIBCPP_STD_VER >= 14
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
struct _LIBCPP_TEMPLATE_VIS is_null_pointer : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {};
|
struct _LIBCPP_TEMPLATE_VIS is_null_pointer : integral_constant<bool, __is_null_pointer_v<_Tp>> {};
|
||||||
|
|
||||||
# if _LIBCPP_STD_VER >= 17
|
# if _LIBCPP_STD_VER >= 17
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value;
|
inline constexpr bool is_null_pointer_v = __is_null_pointer_v<_Tp>;
|
||||||
# endif
|
# endif
|
||||||
#endif // _LIBCPP_STD_VER >= 14
|
#endif // _LIBCPP_STD_VER >= 14
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ struct _LIBCPP_TEMPLATE_VIS is_scalar
|
|||||||
bool, is_arithmetic<_Tp>::value ||
|
bool, is_arithmetic<_Tp>::value ||
|
||||||
is_member_pointer<_Tp>::value ||
|
is_member_pointer<_Tp>::value ||
|
||||||
is_pointer<_Tp>::value ||
|
is_pointer<_Tp>::value ||
|
||||||
__is_nullptr_t<_Tp>::value ||
|
__is_null_pointer_v<_Tp> ||
|
||||||
__is_block<_Tp>::value ||
|
__is_block<_Tp>::value ||
|
||||||
is_enum<_Tp>::value> {};
|
is_enum<_Tp>::value> {};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|||||||
Reference in New Issue
Block a user