Skip to content

Commit 9204eba

Browse files
authored
Remove device override for operator new when the C++ standard >= 26 (#114056)
Related to #114048
1 parent ec353b7 commit 9204eba

File tree

1 file changed

+2
-0
lines changed
  • clang/lib/Headers/cuda_wrappers

1 file changed

+2
-0
lines changed

clang/lib/Headers/cuda_wrappers/new

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,14 @@ __device__ inline void operator delete[](void *ptr,
9191
#endif
9292

9393
// Device overrides for placement new and delete.
94+
#if !(_LIBCPP_STD_VER >= 26 || __cpp_lib_constexpr_new >= 202406L)
9495
__device__ inline void *operator new(__SIZE_TYPE__, void *__ptr) CUDA_NOEXCEPT {
9596
return __ptr;
9697
}
9798
__device__ inline void *operator new[](__SIZE_TYPE__, void *__ptr) CUDA_NOEXCEPT {
9899
return __ptr;
99100
}
101+
#endif
100102
__device__ inline void operator delete(void *, void *) CUDA_NOEXCEPT {}
101103
__device__ inline void operator delete[](void *, void *) CUDA_NOEXCEPT {}
102104

0 commit comments

Comments
 (0)