summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-05-01 20:31:50 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-05-01 20:31:50 +0100
commitca05c4a3c1e536cdf300b49c49004e4e0e54dfea (patch)
tree247612ee86877cd6b2bde0419cb3cb5037161175 /lib
parentAdd the pack container (diff)
downloadilt-ca05c4a3c1e536cdf300b49c49004e4e0e54dfea.tar.bz2
ilt-ca05c4a3c1e536cdf300b49c49004e4e0e54dfea.tar.xz
ilt-ca05c4a3c1e536cdf300b49c49004e4e0e54dfea.zip
Don't explictly call destructor of contained element
Diffstat (limited to 'lib')
-rw-r--r--lib/pack.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/pack.h b/lib/pack.h
index 92c8b20..e63d7cc 100644
--- a/lib/pack.h
+++ b/lib/pack.h
@@ -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();
}