summaryrefslogtreecommitdiff
path: root/lib/pack.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pack.h')
-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();
}