Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Apr 2026 14:18:33 +0000
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: a24406d2e0e8 - main - Revert "libcxx-compat: revert llvmorg-19-init-4003-g55357160d0e1:"
Message-ID:  <69eccd39.3771c.7631c168@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=a24406d2e0e8eee8db03ed8d1ae7fb482cf912ab

commit a24406d2e0e8eee8db03ed8d1ae7fb482cf912ab
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2025-12-06 20:24:15 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-04-25 14:07:41 +0000

    Revert "libcxx-compat: revert llvmorg-19-init-4003-g55357160d0e1:"
    
    This reverts commit fd17362f6225085e60eabed8af7421838100b457, in
    preparation for merging llvm 21.
    
    PR:             292067
    MFC after:      1 month
---
 .../llvm-project/libcxx/include/__type_traits/remove_cv.h | 11 +++--------
 .../libcxx/include/__type_traits/remove_cvref.h           | 15 ++++++++++-----
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h
index c4bf612794bd..8e1c04336432 100644
--- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h
+++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cv.h
@@ -19,22 +19,17 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-#if __has_builtin(__remove_cv) && !defined(_LIBCPP_COMPILER_GCC)
 template <class _Tp>
 struct remove_cv {
   using type _LIBCPP_NODEBUG = __remove_cv(_Tp);
 };
 
+#if defined(_LIBCPP_COMPILER_GCC)
 template <class _Tp>
-using __remove_cv_t = __remove_cv(_Tp);
+using __remove_cv_t = typename remove_cv<_Tp>::type;
 #else
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS remove_cv {
-  typedef __remove_volatile_t<__remove_const_t<_Tp> > type;
-};
-
-template <class _Tp>
-using __remove_cv_t = __remove_volatile_t<__remove_const_t<_Tp> >;
+using __remove_cv_t = __remove_cv(_Tp);
 #endif // __has_builtin(__remove_cv)
 
 #if _LIBCPP_STD_VER >= 14
diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h
index e8e8745ab096..55f894dbd1d8 100644
--- a/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h
+++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_cvref.h
@@ -20,21 +20,26 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-#if __has_builtin(__remove_cvref) && !defined(_LIBCPP_COMPILER_GCC)
+#if defined(_LIBCPP_COMPILER_GCC)
 template <class _Tp>
-using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp);
+struct __remove_cvref_gcc {
+  using type = __remove_cvref(_Tp);
+};
+
+template <class _Tp>
+using __remove_cvref_t _LIBCPP_NODEBUG = typename __remove_cvref_gcc<_Tp>::type;
 #else
 template <class _Tp>
-using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cv_t<__libcpp_remove_reference_t<_Tp> >;
+using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp);
 #endif // __has_builtin(__remove_cvref)
 
 template <class _Tp, class _Up>
-struct __is_same_uncvref : _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> > {};
+using __is_same_uncvref = _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> >;
 
 #if _LIBCPP_STD_VER >= 20
 template <class _Tp>
 struct remove_cvref {
-  using type _LIBCPP_NODEBUG = __remove_cvref_t<_Tp>;
+  using type _LIBCPP_NODEBUG = __remove_cvref(_Tp);
 };
 
 template <class _Tp>


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69eccd39.3771c.7631c168>