diff --git a/include/util/deallocating_vector.hpp b/include/util/deallocating_vector.hpp index a7c87c8ed..1ab630792 100644 --- a/include/util/deallocating_vector.hpp +++ b/include/util/deallocating_vector.hpp @@ -258,8 +258,12 @@ template class DeallocatingVector DeallocatingVector(DeallocatingVector &other) = delete; DeallocatingVector &operator=(DeallocatingVector &other) = delete; // moving is fine - DeallocatingVector(DeallocatingVector &&other) = default; - DeallocatingVector &operator=(DeallocatingVector &&other) = default; + DeallocatingVector(DeallocatingVector &&other) { swap(other); } + DeallocatingVector &operator=(DeallocatingVector &&other) + { + swap(other); + return *this; + } ~DeallocatingVector() { clear(); }