fix not calling the destructor

v1
Brett 2024-03-10 22:57:40 -04:00
parent 62a973246d
commit 263bbc88cf
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
include(cmake/color.cmake) include(cmake/color.cmake)
set(BLT_VERSION 0.14.10) set(BLT_VERSION 0.14.11)
set(BLT_TEST_VERSION 0.0.1) set(BLT_TEST_VERSION 0.0.1)
set(BLT_TARGET BLT) set(BLT_TARGET BLT)

View File

@ -878,7 +878,7 @@ namespace blt
template<class U> template<class U>
inline void destroy(U* p) inline void destroy(U* p)
{ {
if constexpr (std::is_trivially_destructible_v<U>) if constexpr (!std::is_trivially_destructible_v<U>)
{ {
if (p != nullptr) if (p != nullptr)
p->~U(); p->~U();