diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2025-12-06 20:24:15 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2026-04-25 14:07:43 +0000 |
| commit | 3b0a0e64bd9f0a65f0dd62dc157597e6d9ecc933 (patch) | |
| tree | 21da013c8230dae1fdb882f2decd013837f8d658 | |
| parent | f8152c67d4272e155460e4b3057b41924df8af1c (diff) | |
Revert "libcxx-compat: revert llvmorg-19-init-17853-g578c6191eff7:"
This reverts commit 2facc097b9b28a81b925c924f27f09b40f29fd4d, in
preparation for merging llvm 21.
PR: 292067
MFC after: 1 month
| -rw-r--r-- | contrib/llvm-project/libcxx/include/__type_traits/is_void.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_void.h b/contrib/llvm-project/libcxx/include/__type_traits/is_void.h index 4c27060530c8..46316b0d3a53 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_void.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_void.h @@ -11,8 +11,6 @@ #include <__config> #include <__type_traits/integral_constant.h> -#include <__type_traits/is_same.h> -#include <__type_traits/remove_cv.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -20,28 +18,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__is_void) - template <class _Tp> -struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_void(_Tp)> {}; +struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_same(__remove_cv(_Tp), void)> {}; # if _LIBCPP_STD_VER >= 17 template <class _Tp> -inline constexpr bool is_void_v = __is_void(_Tp); +inline constexpr bool is_void_v = __is_same(__remove_cv(_Tp), void); # endif -#else - -template <class _Tp> -struct _LIBCPP_TEMPLATE_VIS is_void : public is_same<__remove_cv_t<_Tp>, void> {}; - -# if _LIBCPP_STD_VER >= 17 -template <class _Tp> -inline constexpr bool is_void_v = is_void<_Tp>::value; -# endif - -#endif // __has_builtin(__is_void) - _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___TYPE_TRAITS_IS_VOID_H |
