diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-01 20:31:50 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-01 20:31:50 +0100 |
commit | ca05c4a3c1e536cdf300b49c49004e4e0e54dfea (patch) | |
tree | 247612ee86877cd6b2bde0419cb3cb5037161175 /lib/pack.h | |
parent | Add the pack container (diff) | |
download | ilt-ca05c4a3c1e536cdf300b49c49004e4e0e54dfea.tar.bz2 ilt-ca05c4a3c1e536cdf300b49c49004e4e0e54dfea.tar.xz ilt-ca05c4a3c1e536cdf300b49c49004e4e0e54dfea.zip |
Don't explictly call destructor of contained element
Diffstat (limited to 'lib/pack.h')
-rw-r--r-- | lib/pack.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -33,9 +33,8 @@ public: void erase(typename Container<T>::iterator pos) { - pos->~T(); if (&*pos != &Container<T>::back()) { - new (&*pos) T(std::move(Container<T>::back())); + *pos = std::move(Container<T>::back()); } Container<T>::pop_back(); } |