Browse Source

fixed stuff for trivially destructibles

Also works for fixing base types since they are trivially destructibles.
master
Ludovic 'Archivist' Lagouardette 2 years ago
parent
commit
7b756ce477
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      include/gp/containers/vector.hpp

+ 1
- 0
include/gp/containers/vector.hpp View File

@ -88,6 +88,7 @@ namespace gp{
new(ary+i) T(oth[i]);
}
} else if(sz > oth.sz) {
if constexpr (!std::is_trivially_destructible_v<T>)
for(size_t i = oth.sz; i < sz; ++i) {
ary[i]->~T();
}

Loading…
Cancel
Save