diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h b/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h index 55f8e41f75f4..57206e0d9deb 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h @@ -1,48 +1,48 @@ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef _LIBCPP___TYPE_TRAITS_IS_FUNDAMENTAL_H #define _LIBCPP___TYPE_TRAITS_IS_FUNDAMENTAL_H #include <__config> #include <__type_traits/integral_constant.h> #include <__type_traits/is_null_pointer.h> #include <__type_traits/is_void.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD #if __has_builtin(__is_fundamental) template struct _LIBCPP_TEMPLATE_VIS is_fundamental : _BoolConstant<__is_fundamental(_Tp)> {}; # if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_fundamental_v = __is_fundamental(_Tp); # endif #else // __has_builtin(__is_fundamental) template struct _LIBCPP_TEMPLATE_VIS is_fundamental - : public integral_constant::value || __is_null_pointer_v<_Tp> || is_arithmetic<_Tp>::value> {}; + : public integral_constant::value || __is_nullptr_t<_Tp>::value || is_arithmetic<_Tp>::value> {}; # if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_fundamental_v = is_fundamental<_Tp>::value; # endif #endif // __has_builtin(__is_fundamental) _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_FUNDAMENTAL_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h index 9f5697e23268..c666f5f24759 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h @@ -1,37 +1,43 @@ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef _LIBCPP___TYPE_TRAITS_IS_NULL_POINTER_H #define _LIBCPP___TYPE_TRAITS_IS_NULL_POINTER_H #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/remove_cv.h> #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD template -inline const bool __is_null_pointer_v = __is_same(__remove_cv(_Tp), nullptr_t); +struct __is_nullptr_t_impl : public false_type {}; +template <> +struct __is_nullptr_t_impl : public true_type {}; + +template +struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; #if _LIBCPP_STD_VER >= 14 template -struct _LIBCPP_TEMPLATE_VIS is_null_pointer : integral_constant> {}; +struct _LIBCPP_TEMPLATE_VIS is_null_pointer : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; # if _LIBCPP_STD_VER >= 17 template -inline constexpr bool is_null_pointer_v = __is_null_pointer_v<_Tp>; +inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; # endif #endif // _LIBCPP_STD_VER >= 14 _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_NULL_POINTER_H diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h b/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h index 455200de4720..15f1c71554f2 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h @@ -1,69 +1,69 @@ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef _LIBCPP___TYPE_TRAITS_IS_SCALAR_H #define _LIBCPP___TYPE_TRAITS_IS_SCALAR_H #include <__config> #include <__type_traits/integral_constant.h> #include <__type_traits/is_arithmetic.h> #include <__type_traits/is_enum.h> #include <__type_traits/is_member_pointer.h> #include <__type_traits/is_null_pointer.h> #include <__type_traits/is_pointer.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD #if __has_builtin(__is_scalar) template struct _LIBCPP_TEMPLATE_VIS is_scalar : _BoolConstant<__is_scalar(_Tp)> {}; # if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_scalar_v = __is_scalar(_Tp); # endif #else // __has_builtin(__is_scalar) template struct __is_block : false_type {}; # if defined(_LIBCPP_HAS_EXTENSION_BLOCKS) template struct __is_block<_Rp (^)(_Args...)> : true_type {}; # endif // clang-format off template struct _LIBCPP_TEMPLATE_VIS is_scalar : public integral_constant< bool, is_arithmetic<_Tp>::value || is_member_pointer<_Tp>::value || is_pointer<_Tp>::value || - __is_null_pointer_v<_Tp> || + __is_nullptr_t<_Tp>::value || __is_block<_Tp>::value || is_enum<_Tp>::value> {}; // clang-format on template <> struct _LIBCPP_TEMPLATE_VIS is_scalar : public true_type {}; # if _LIBCPP_STD_VER >= 17 template inline constexpr bool is_scalar_v = is_scalar<_Tp>::value; # endif #endif // __has_builtin(__is_scalar) _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_SCALAR_H