Replace destructor call with static assert
All checks were successful
Tests / Release [gcc] total: 827, passed: 827
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 826, passed: 826
Tests / Coverage total: 825, passed: 825
weaselab/conflict-set/pipeline/head This commit looks good

This commit is contained in:
2024-03-08 17:17:12 -08:00
parent 34430dbbe7
commit b79d8f71d3

View File

@@ -299,7 +299,7 @@ struct BoundedFreeListAllocator {
#if SHOW_MEMORY
--liveAllocations;
#endif
p->~T();
static_assert(std::is_trivially_destructible_v<T>);
if (freeListSize == kMaxFreeListSize) {
return free(p);
}