Erase the source SeArray immediately in move ctor.

This commit is contained in:
hashlag committed 2026-10-18 01:00:52 +03:00
1 parent 49a4b18163
commit dcaeab7b43
2 files changed
+10 -1

No files matched your search

+7 -1
View File
@@ -4,6 +4,7 @@
#include <array>
#include <concepts>
#include <cstddef>
#include <utility>
namespace Chaos::Service
{
@@ -18,7 +19,12 @@ public:
}
SeArray(const SeArray & other) = delete;
SeArray(SeArray && other) = default;
SeArray(SeArray && other)
{
Storage_ = std::move(other.Storage_);
other.EraseImpl();
}
SeArray & operator=(const SeArray & other) = default;
SeArray & operator=(SeArray && other) = default;