From b79d8f71d34406ffbcef5de0609754a03b12b5fb Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Fri, 8 Mar 2024 17:17:12 -0800 Subject: [PATCH] Replace destructor call with static assert --- ConflictSet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index e476e26..a467365 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -299,7 +299,7 @@ struct BoundedFreeListAllocator { #if SHOW_MEMORY --liveAllocations; #endif - p->~T(); + static_assert(std::is_trivially_destructible_v); if (freeListSize == kMaxFreeListSize) { return free(p); }