[libcxx-commits] [libcxx] [libc++] Don't use incomplete remove_pointer builtin for GCC (PR #91838)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat May 11 02:19:53 PDT 2024
================
@@ -24,7 +24,7 @@ struct remove_pointer {
};
template <class _Tp>
-using __remove_pointer_t = __remove_pointer(_Tp);
+using __remove_pointer_t = typename remove_pointer<_Tp>::type;
----------------
Chilledheart wrote:
Hello frederick,
I think there are many similar new builtins implemented in furture gcc releases which might cause the similar issues.
So you prefer to
```
diff --git a/libcxx/include/__type_traits/remove_pointer.h b/libcxx/include/__type_traits/remove_pointer.h
index 54390a1939f7..0bd0fbf4485d 100644
--- a/libcxx/include/__type_traits/remove_pointer.h
+++ b/libcxx/include/__type_traits/remove_pointer.h
@@ -17,7 +17,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__remove_pointer)
+#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__remove_pointer) && !defined(_LIBCPP_COMPILER_GCC)
template <class _Tp>
struct remove_pointer {
using type _LIBCPP_NODEBUG = __remove_pointer(_Tp);
```
Right?
Yours,
https://github.com/llvm/llvm-project/pull/91838
More information about the libcxx-commits
mailing list