[clang] Remove device override for operator new when the C++ standard >= 26 (PR #114056)
Ognyan Mirev via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 29 16:21:58 PDT 2024
================
@@ -91,12 +91,14 @@ __device__ inline void operator delete[](void *ptr,
#endif
// Device overrides for placement new and delete.
+#if _LIBCPP_STD_VER < 26
----------------
OgnianM wrote:
Looks like it
https://github.com/gcc-mirror/gcc/blob/9dd9a88b75334bc079b8ab5fb2dbb5d56765bd60/libstdc%2B%2B-v3/libsupc%2B%2B/new#L198-L214
I have an older version of libstdc++ on my system, so I can't easily test it, but it looks like changing this to
`#if _LIBCPP_STD_VER < 26 || __cpp_lib_constexpr_new < 202406L` should work.
https://github.com/llvm/llvm-project/pull/114056
More information about the cfe-commits
mailing list