1
0
mirror of https://git.FreeBSD.org/src.git synced 2026-06-02 11:24:32 +00:00

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 3b0a0e64bd)
This commit is contained in:
Dimitry Andric
2025-12-06 21:24:15 +01:00
parent 938fce67e0
commit ad1cd2c339
@@ -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