CXX: libcxx/libcxx/src/random.cpp In file included from nuttx/include/libcxx/__filesystem/filesystem_error.h:15,
from nuttx/include/libcxx/__filesystem/directory_entry.h:20,
from nuttx/include/libcxx/filesystem:539,
from nuttx/include/libcxx/fstream:192,
from libcxx/libcxx/src/ios.instantiations.cpp:10:
nuttx/include/libcxx/__filesystem/path.h: In instantiation of 'std::__1::__fs::filesystem::path::_EnableIfPathable<_Source> std::__1::__fs::filesystem::path::append(const _Source&) [with _Source = std::__1::basic_string<char>]':
nuttx/include/libcxx/__filesystem/path.h:623:30: error: use of built-in trait '__remove_pointer(typename std::__1::decay<_Tp>::type)' in function signature; use library traits instead
623 | _EnableIfPathable<_Source> append(const _Source& __src) {
| ^~~~~~
Pick the change from llvm-project:
https://github.com/llvm/llvm-project/pull/92663
Signed-off-by: chao an <anchao.archer@bytedance.com>
35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
From cb7a03b41fff563c0cbb5145eed09f9b17edf9e2 Mon Sep 17 00:00:00 2001
|
|
From: Nikolas Klauser <nikolasklauser@berlin.de>
|
|
Date: Sat, 1 Jun 2024 12:20:41 +0200
|
|
Subject: [PATCH] [libc++] Fix failures with GCC 14 (#92663)
|
|
|
|
Fixes #91831
|
|
|
|
Signed-off-by: chao an <anchao.archer@bytedance.com>
|
|
|
|
---
|
|
libcxx/include/__type_traits/remove_pointer.h | 5 +++++
|
|
11 files changed, 22 insertions(+), 8 deletions(-)
|
|
|
|
diff --git libcxx/include/__type_traits/remove_pointer.h b/libcxx/include/__type_traits/remove_pointer.h
|
|
index 54390a1939f7..1048f67055a2 100644
|
|
--- libcxx/include/__type_traits/remove_pointer.h
|
|
+++ libcxx/include/__type_traits/remove_pointer.h
|
|
@@ -23,8 +23,13 @@ struct remove_pointer {
|
|
using type _LIBCPP_NODEBUG = __remove_pointer(_Tp);
|
|
};
|
|
|
|
+# ifdef _LIBCPP_COMPILER_GCC
|
|
+template <class _Tp>
|
|
+using __remove_pointer_t = typename remove_pointer<_Tp>::type;
|
|
+# else
|
|
template <class _Tp>
|
|
using __remove_pointer_t = __remove_pointer(_Tp);
|
|
+# endif
|
|
#else
|
|
// clang-format off
|
|
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer {typedef _LIBCPP_NODEBUG _Tp type;};
|
|
|
|
--
|
|
2.43.0
|
|
|