diff --git a/common/include/u_mem.h b/common/include/u_mem.h index 56d80eedf..0e9808691 100644 --- a/common/include/u_mem.h +++ b/common/include/u_mem.h @@ -95,7 +95,7 @@ static inline void mem_init(void) template T *MALLOC(T *&r, std::size_t count, const char *var, const char *file, unsigned line) { - static_assert(std::is_pod::value, "MALLOC cannot allocate non-POD"); + static_assert(std::is_integral::value, "MALLOC cannot allocate non-integral"); return r = reinterpret_cast(mem_malloc(count * sizeof(T), var, file, line)); } @@ -104,7 +104,7 @@ T *MALLOC(T *&r, std::size_t count, const char *var, const char *file, unsigned template static inline void d_free(T *&ptr) { - static_assert((std::is_same::value || std::is_pod::value), "d_free cannot free non-POD"); + static_assert((std::is_same::value || std::is_integral::value), "d_free cannot free non-integral"); mem_free(std::exchange(ptr, nullptr)); } @@ -130,7 +130,7 @@ class RAIIdmem : public std::unique_ptr> { typedef std::unique_ptr> base_ptr; public: - static_assert(std::is_pod::value, "RAIIdmem cannot manage non-POD"); + static_assert(std::is_integral::value, "RAIIdmem cannot manage non-integral"); using base_ptr::base_ptr; };