Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vector& operator=(Vector&& other)
- {
- if (this->data_ == other.data())
- {
- return *this;
- }
- else
- {
- this->~Vector();
- this->size_ = other.size();
- this->capacity_ = other.capacity();
- this->data_ = other.data();
- other.data_ = nullptr;
- other.size_ = 0;
- other.capacity_ = 0;
- return *this;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement