diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2025-12-06 20:24:15 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2026-05-29 22:59:33 +0000 |
| commit | ad1cd2c339cbdbbab71964c1edc68fede37a29ed (patch) | |
| tree | 4e21102546bf2ac40154d51e2394e53ea5d9ea10 | |
| parent | 938fce67e0071e996cec36ae8f0fe7bd765f9eb7 (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
(cherry picked from commit 3b0a0e64bd9f0a65f0dd62dc157597e6d9ecc933)
| -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 |
