Erase the source SeArray immediately in move ctor.
This commit is contained in:
1 parent
89bf5914d5
commit
fc67ba6b46
2 files changed
+10
-1
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user