| Index: third_party/base/nonstd_unique_ptr.h
|
| diff --git a/third_party/base/nonstd_unique_ptr.h b/third_party/base/nonstd_unique_ptr.h
|
| index 1d1c43f42fb4ac706cb1ce01795b03f986e6c58a..d666e1eeb2586d093a496cd29eaf51f2a37d7c9a 100644
|
| --- a/third_party/base/nonstd_unique_ptr.h
|
| +++ b/third_party/base/nonstd_unique_ptr.h
|
| @@ -176,6 +176,13 @@ class unique_ptr : public unique_ptr_base<C> {
|
| }
|
| }
|
|
|
| + // Move assignment.
|
| + unique_ptr<C>& operator=(unique_ptr<C>&& that) {
|
| + if (that.ptr_ != ptr_)
|
| + reset(that.release());
|
| + return *this;
|
| + }
|
| +
|
| private:
|
| // Forbid comparison of unique_ptr types. If C2 != C, it totally doesn't
|
| // make sense, and if C2 == C, it still doesn't make sense because you should
|
| @@ -222,6 +229,13 @@ class unique_ptr<C[]> : public unique_ptr_base<C> {
|
| }
|
| }
|
|
|
| + // Move assignment.
|
| + unique_ptr<C>& operator=(unique_ptr<C>&& that) {
|
| + if (that.ptr_ != ptr_)
|
| + reset(that.release());
|
| + return *this;
|
| + }
|
| +
|
| // Support indexing since it is holding array.
|
| C& operator[] (size_t i) { return ptr_[i]; }
|
|
|
|
|