Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 May 2026 23:01:56 +0000
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc:        Dimitry Andric <dimitry@andric.com>
Subject:   git: ad43dd6b3ed3 - stable/15 - libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83:
Message-ID:  <6a1a1ae4.4133d.433aab7c@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by dim:

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

commit ad43dd6b3ed34efebdbf45747a0cd61662b208d6
Author:     Dimitry Andric <dimitry@andric.com>
AuthorDate: 2026-01-05 19:54:32 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-05-29 22:57:32 +0000

    libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83:
    
      [libc++] Simplify the implementation of remove_reference (#85207)
    
      GCC 13 introduced the type trait `__remove_reference`. We can simplify
      the implementation of `remove_reference` a bit by using it.
    
    This is part of making libc++ 21 build with clang 18.
    
    PR:             292067
    MFC after:      1 month
    
    (cherry picked from commit a114ece3e6158f49088b0704b4afef07040d83f3)
---
 .../llvm-project/libcxx/include/__type_traits/remove_reference.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h
index 7cc3ca1705de..f7522fa1a67d 100644
--- a/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h
+++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h
@@ -34,7 +34,14 @@ struct remove_reference {
 template <class _Tp>
 using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type;
 #else
-#  error "remove_reference not implemented!"
+// clang-format off
+template <class _Tp> struct remove_reference        {using type _LIBCPP_NODEBUG = _Tp;};
+template <class _Tp> struct remove_reference<_Tp&>  {using type _LIBCPP_NODEBUG = _Tp;};
+template <class _Tp> struct remove_reference<_Tp&&> {using type _LIBCPP_NODEBUG = _Tp;};
+// clang-format on
+
+template <class _Tp>
+using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type;
 #endif // __has_builtin(__remove_reference_t)
 
 #if _LIBCPP_STD_VER >= 14


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a1a1ae4.4133d.433aab7c>