diff --git a/include/gp/containers/vector.hpp b/include/gp/containers/vector.hpp index 6fc2377..8c15d13 100644 --- a/include/gp/containers/vector.hpp +++ b/include/gp/containers/vector.hpp @@ -88,6 +88,7 @@ namespace gp{ new(ary+i) T(oth[i]); } } else if(sz > oth.sz) { + if constexpr (!std::is_trivially_destructible_v) for(size_t i = oth.sz; i < sz; ++i) { ary[i]->~T(); }