diff --git a/rocprim/include/rocprim/config.hpp b/rocprim/include/rocprim/config.hpp
index 2dd3e55..36acff1 100644
--- a/rocprim/include/rocprim/config.hpp
+++ b/rocprim/include/rocprim/config.hpp
@@ -27,6 +27,12 @@
 #include <hip/hip_fp16.h>
 #include <hip/hip_runtime.h>
 
+__device__ _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
+{
+	return __p;
+}
+__device__ inline void operator delete (void*, void*) _GLIBCXX_USE_NOEXCEPT {}
+
 // This file is generated by CMake. It's safe to ignore this when parsed by clangd.
 #ifndef _CLANGD
     #include "rocprim_version.hpp"
